1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 20:05:35 +02:00

tests for getter and setter generation

This commit is contained in:
Alena Laskavaia 2010-08-11 02:05:56 +00:00
parent 418504cb70
commit 2828f69a77

View file

@ -1406,3 +1406,49 @@ void test::setI(int i)
#endif /* TEST_H_ */ #endif /* TEST_H_ */
//!Bug 319111 - Generate getters and setters fails on complex field types
//#org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTest
//@.config
filename=Test.h
//@Test.h
class X {
int (*(*/*$*/funcptr/*$$*/)())[2];
public:
X();
};
//=
typedef int (*(*funcptrType)())[2];
class X {
int (*(*funcptr)())[2];
public:
X();
funcptrType getFuncptr() const;
void setFuncptr(funcptrType funcptr);
};
//@Test.cpp
X::X(){
}
//=
X::X(){
}
funcptrType X::getFuncptr() const
{
return funcptr;
}
void X::setFuncptr(funcptrType funcptr)
{
this->funcptr = funcptr;
}