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:
parent
418504cb70
commit
2828f69a77
1 changed files with 46 additions and 0 deletions
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue