diff options
author | Sergey Prigogin | 2012-01-06 04:23:58 +0000 |
---|---|---|
committer | Sergey Prigogin | 2012-01-06 04:46:20 +0000 |
commit | 046c25fadbb7af066116aa07b03cb1e497148742 (patch) | |
tree | e81b23162e5048bd991155e9d941d09d9cddb6bc /core/org.eclipse.cdt.ui.tests/resources | |
parent | 76e962ee9b55f4f365d3146f8cd63d8607e82963 (diff) | |
download | org.eclipse.cdt-046c25fadbb7af066116aa07b03cb1e497148742.tar.gz org.eclipse.cdt-046c25fadbb7af066116aa07b03cb1e497148742.tar.xz org.eclipse.cdt-046c25fadbb7af066116aa07b03cb1e497148742.zip |
Visibility ordering within a class declaration.
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests/resources')
3 files changed, 81 insertions, 86 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractConstant.rts b/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractConstant.rts index a402270781e..8099b078d57 100644 --- a/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractConstant.rts +++ b/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractConstant.rts @@ -397,7 +397,6 @@ public: }; #endif /*A_H_*/ - //= #ifndef A_H_ #define A_H_ @@ -413,7 +412,6 @@ private: }; #endif /*A_H_*/ - //@A.cpp #include "A.h" @@ -426,7 +424,6 @@ A::~A() { int A::foo() { return /*$*/42/*$$*/; } - //= #include "A.h" @@ -439,8 +436,7 @@ A::~A() { int A::foo() { return theAnswer; } - -//!Bug 246062 [Refactoring] NPE extracting a constant from an inlined method +//!Bug 246062 - Extracting a constant from an inlined method //#org.eclipse.cdt.ui.tests.refactoring.extractconstant.ExtractConstantRefactoringTest //@.config filename=A.h @@ -450,18 +446,17 @@ class X { int a = /*$*/42/*$$*/; } }; - //= class X { +public: + static const int theAnswer = 42; + +private: void method() { int a = theAnswer; } - -public: - static const int theAnswer = 42; }; - -//!ExtractConstantString +//!Extract constant string //#org.eclipse.cdt.ui.tests.refactoring.extractconstant.ExtractConstantRefactoringTest //@.config visibility=private diff --git a/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractMethod.rts b/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractMethod.rts index 513d9d6d58d..368414c0540 100644 --- a/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractMethod.rts +++ b/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractMethod.rts @@ -1480,7 +1480,6 @@ private: }; #endif /*A_H_*/ - //= #ifndef A_H_ #define A_H_ @@ -1491,15 +1490,14 @@ public: virtual ~A(); int foo(); -private: - int help(); - protected: void exp(int& i); + +private: + int help(); }; #endif /*A_H_*/ - //@A.cpp #include "A.h" @@ -1519,7 +1517,6 @@ int A::foo() { int A::help() { return 42; } - //= #include "A.h" @@ -1543,7 +1540,6 @@ int A::foo() { int A::help() { return 42; } - //@.config filename=A.cpp methodname=exp diff --git a/core/org.eclipse.cdt.ui.tests/resources/refactoring/GenerateGettersAndSetters.rts b/core/org.eclipse.cdt.ui.tests/resources/refactoring/GenerateGettersAndSetters.rts index 9d55f345d59..a270920614c 100644 --- a/core/org.eclipse.cdt.ui.tests/resources/refactoring/GenerateGettersAndSetters.rts +++ b/core/org.eclipse.cdt.ui.tests/resources/refactoring/GenerateGettersAndSetters.rts @@ -71,10 +71,6 @@ public: int GetUniqueId(); - char* getName() const { - return name; - } - int getSystemId() { return systemId; } @@ -82,6 +78,10 @@ public: void setSystemId(int systemId) { this->systemId = systemId; } + + char* getName() const { + return name; + } }; int gooo = 1; @@ -176,10 +176,6 @@ public: int GetUniqueId(); - char* getName() const { - return name; - } - int getSystemId() { return systemId; } @@ -187,6 +183,10 @@ public: void setSystemId(int systemId) { this->systemId = systemId; } + + char* getName() const { + return name; + } }; } @@ -246,7 +246,6 @@ public: } }; - int gooo = 1; #endif /* A_H_ */ @@ -278,10 +277,6 @@ public: int GetUniqueId(); - void setName(char* name) { - this->name = name; - } - int getSystemId() { return systemId; } @@ -289,8 +284,11 @@ public: void setSystemId(int systemId) { this->systemId = systemId; } -}; + void setName(char* name) { + this->name = name; + } +}; int gooo = 1; @@ -379,14 +377,6 @@ public: int GetUniqueId(); - char* getName() const { - return name; - } - - void setName(char* name) { - this->name = name; - } - int getSystemId() { return systemId; } @@ -394,6 +384,14 @@ public: void setSystemId(int systemId) { this->systemId = systemId; } + + char* getName() const { + return name; + } + + void setName(char* name) { + this->name = name; + } }; int gooo = 1; @@ -463,6 +461,18 @@ public: Person myFriend; + Person(int socSecNo); // constructor + + ~Person(); // destructor + + char* Name(); + + void Print(); + + int SocSecNo(); + + int GetUniqueId(); + char* getName() const { return name; } @@ -478,18 +488,6 @@ public: void setSystemId(int systemId) { this->systemId = systemId; } - - Person(int socSecNo); // constructor - - ~Person(); // destructor - - char* Name(); - - void Print(); - - int SocSecNo(); - - int GetUniqueId(); }; int gooo = 1; @@ -567,7 +565,7 @@ GaS::Getters() { GaS::~Getters() { } -//!Generate Getters and Setters no Methods +//!Generate Getters and Setters no methods //#org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTest //@.config filename=A.h @@ -588,9 +586,6 @@ private: #define A_H_ class Person { -private: - int id; - public: int getId() const { return id; @@ -599,15 +594,19 @@ public: void setId(int id) { this->id = id; } + +private: + int id; }; #endif /* A_H_ */ -//!Generate Getters and Setters no Methods +//!Generate Getters and Setters no methods ascending visibility order //#org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTest //@.config filename=A.h getters=i setters=i +ascendingVisibilityOrder=true //@A.h /* * test.h @@ -624,7 +623,6 @@ class test { }; #endif /* TEST_H_ */ - //= /* * test.h @@ -650,8 +648,7 @@ public: }; #endif /* TEST_H_ */ - -//!Generate Getters and Setters no Fields +//!Generate Getters and Setters no fields //#org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTest //@.config filename=A.h @@ -759,8 +756,6 @@ public: Person myFriend; - const FullName& getName() const; - void setName(const FullName& name); Person(int socSecNo); // constructor ~Person(); // destructor @@ -776,6 +771,8 @@ public: int getSystemId(); void setSystemId(int systemId); + const FullName& getName() const; + void setName(const FullName& name); }; int gooo = 1; @@ -886,7 +883,6 @@ public: int SocSecNo(); int GetUniqueId(); - char* getName() const; int getSystemId() { return systemId; @@ -895,6 +891,8 @@ public: void setSystemId(int systemId) { this->systemId = systemId; } + + char* getName() const; }; } @@ -1005,7 +1003,6 @@ public: int SocSecNo(); int GetUniqueId(); - void setName(char* name); int getSystemId() { return systemId; @@ -1014,6 +1011,8 @@ public: void setSystemId(int systemId) { this->systemId = systemId; } + + void setName(char* name); }; int gooo = 1; @@ -1115,8 +1114,6 @@ public: int SocSecNo(); int GetUniqueId(); - char* getName() const; - void setName(char* name); int getSystemId() { return systemId; @@ -1125,6 +1122,9 @@ public: void setSystemId(int systemId) { this->systemId = systemId; } + + char* getName() const; + void setName(char* name); }; int gooo = 1; @@ -1178,12 +1178,12 @@ private: #define A_H_ class Person { -private: - int id; - public: int getId() const; void setId(int id); + +private: + int id; }; inline int Person::getId() const { @@ -1228,13 +1228,14 @@ class test { //comment1 class test { - int i; //comment2 - char* b; - //comment3 - public: int getI() const; void setI(int i); + +private: + int i; //comment2 + char* b; + //comment3 }; inline int test::getI() const { @@ -1275,12 +1276,13 @@ class Test { namespace foo { class Test { - int testField; - void foo(); - public: int getTestField() const; void setTestField(int testField); + +private: + int testField; + void foo(); }; } // namespace foo @@ -1334,11 +1336,12 @@ class Test { #define TEST_H_ class Test { - int testField; - public: int getTestField() const; void setTestField(int testField); + +private: + int testField; }; #endif @@ -1374,11 +1377,12 @@ class Test { #define TEST_H_ class Test { - int testField; - public: int getTestField() const; void setTestField(int testField); + +private: + int testField; }; #endif @@ -1464,13 +1468,13 @@ private: #define A_H_ class A { -private: - int a[2]; - public: const int* getA() const { return a; } + +private: + int a[2]; }; #endif /* A_H_ */ //!Bug 352258 - Avoiding reserved names @@ -1493,9 +1497,6 @@ private: #define A_H_ class getClass { -private: - int mClass; - public: int getClass1() const { return mClass; @@ -1504,5 +1505,8 @@ public: void setClass(int _class) { mClass = _class; } + +private: + int mClass; }; #endif /* A_H_ */ |