Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Stornelli2019-04-12 12:15:16 -0400
committerMarco Stornelli2019-05-12 09:42:21 -0400
commitf893b77dba991ba1b3348d72267573540e9ce8bd (patch)
tree91b5f2cbe30fb629af8007f444b31b138c077039 /core/org.eclipse.cdt.ui.tests
parent826a0b2c0effc6a8d1479ddbff8d5b4bbd31a6b6 (diff)
downloadorg.eclipse.cdt-f893b77dba991ba1b3348d72267573540e9ce8bd.tar.gz
org.eclipse.cdt-f893b77dba991ba1b3348d72267573540e9ce8bd.tar.xz
org.eclipse.cdt-f893b77dba991ba1b3348d72267573540e9ce8bd.zip
Bug 461435 - Added options to format pointers in methods
Rules used: 1) Default is right alignment to be compliant with built-in formatter rules; 2) Pointer with declarator without name will be always left alignment unless there's a nested declarator; 3) Return value of methods/functions is always left alignment; 4) If left alignment is selected, if space after comma is selected too for a declaration list, space is always forced after the comma. Change-Id: I82d5ad130e665e5357644cc59655a558f3fb732f Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests')
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/constalign/leftChanged/After.cpp8
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/constalign/leftChanged/Before.cpp2
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/constalign/rightChanged/After.cpp8
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/constalign/rightChanged/Before.cpp2
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/formatter/bugs/After.cpp4
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/formatter/preview/After.cpp8
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp8
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/formatter/templates/After.cpp10
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantRefactoringTest.java24
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionRefactoringTest.java114
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractlocalvariable/ExtractLocalVariableRefactoringTest.java12
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/gettersandsetters/GenerateGettersAndSettersTest.java94
-rwxr-xr-xcore/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/implementmethod/ImplementMethodRefactoringTest.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/includes/IncludeOrganizerTest.java2
-rwxr-xr-xcore/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/overridemethods/OverrideMethodsRefactoringTest.java24
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/togglefunction/ToggleRefactoringTest.java46
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CodeFormatterTest.java86
17 files changed, 228 insertions, 228 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/resources/constalign/leftChanged/After.cpp b/core/org.eclipse.cdt.ui.tests/resources/constalign/leftChanged/After.cpp
index 658556eec44..2b257faac69 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/constalign/leftChanged/After.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/constalign/leftChanged/After.cpp
@@ -1,7 +1,7 @@
-void f(const int * const);
+void f(const int* const);
-void f(const int * const) {
+void f(const int* const) {
}
@@ -11,7 +11,7 @@ int main(int argc, char **argv) {
const int j { 8 };
- const int * const klz;
+ const int *const klz;
const int l { 2 };
@@ -25,4 +25,4 @@ int main(int argc, char **argv) {
using const_int = int;
const const_int s = 7;
-} \ No newline at end of file
+}
diff --git a/core/org.eclipse.cdt.ui.tests/resources/constalign/leftChanged/Before.cpp b/core/org.eclipse.cdt.ui.tests/resources/constalign/leftChanged/Before.cpp
index 71fc943a67f..f25df27fd7b 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/constalign/leftChanged/Before.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/constalign/leftChanged/Before.cpp
@@ -26,4 +26,4 @@ int main(int argc, char **argv) {
using const_int = int;
const_int const s = 7;
-} \ No newline at end of file
+}
diff --git a/core/org.eclipse.cdt.ui.tests/resources/constalign/rightChanged/After.cpp b/core/org.eclipse.cdt.ui.tests/resources/constalign/rightChanged/After.cpp
index d46d4b9ee53..a96b5176bf1 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/constalign/rightChanged/After.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/constalign/rightChanged/After.cpp
@@ -1,7 +1,7 @@
-void f(int const * const);
+void f(int const* const);
-void f(int const * const) {
+void f(int const* const) {
}
@@ -11,7 +11,7 @@ int main(int argc, char **argv) {
int const j { 8 };
- int const * const klz;
+ int const *const klz;
int const l { 2 };
@@ -23,4 +23,4 @@ int main(int argc, char **argv) {
using int_const = int;
int_const const r = 7;
-} \ No newline at end of file
+}
diff --git a/core/org.eclipse.cdt.ui.tests/resources/constalign/rightChanged/Before.cpp b/core/org.eclipse.cdt.ui.tests/resources/constalign/rightChanged/Before.cpp
index 84a0ff7214e..0a73c053946 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/constalign/rightChanged/Before.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/constalign/rightChanged/Before.cpp
@@ -24,4 +24,4 @@ int main(int argc, char **argv) {
using int_const = int;
const int_const r = 7;
-} \ No newline at end of file
+}
diff --git a/core/org.eclipse.cdt.ui.tests/resources/formatter/bugs/After.cpp b/core/org.eclipse.cdt.ui.tests/resources/formatter/bugs/After.cpp
index 9294a64417a..3aa42ba501e 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/formatter/bugs/After.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/formatter/bugs/After.cpp
@@ -24,8 +24,8 @@ AClass::AClass(int x) throw (int) :
int main(int argc, char **argv) {
}
// handling of string concat
-char* s1 = "this " "is " "one " "string.";
-char* s2 = "this " "is "
+char *s1 = "this " "is " "one " "string.";
+char *s2 = "this " "is "
"one " "string.";
// macro definition with line comment
#define ID(x) x // identity
diff --git a/core/org.eclipse.cdt.ui.tests/resources/formatter/preview/After.cpp b/core/org.eclipse.cdt.ui.tests/resources/formatter/preview/After.cpp
index 4f07ae9de88..e712f9feab8 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/formatter/preview/After.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/formatter/preview/After.cpp
@@ -7,17 +7,17 @@ public:
Point(double x, double y) :
x(x), y(y) {
}
- double distance(const Point& other) const;
- int compareX(const Point& other) const;
+ double distance(const Point &other) const;
+ int compareX(const Point &other) const;
double x;
double y;
};
-double Point::distance(const Point& other) const {
+double Point::distance(const Point &other) const {
double dx = x - other.x;
double dy = y - other.y;
return sqrt(dx * dx + dy * dy);
}
-int Point::compareX(const Point& other) const {
+int Point::compareX(const Point &other) const {
if (x < other.x) {
return -1;
} else if (x > other.x) {
diff --git a/core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp b/core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp
index 3fb644c93a3..4a449ebf937 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp
@@ -8,9 +8,9 @@ struct SimpleStruct {
float floatNum;
};
-void SimpleStruct_construct(struct SimpleStruct * const s);
+void SimpleStruct_construct(struct SimpleStruct *const s);
-int SimpleStruct_doSomething(const struct SimpleStruct * const s);
+int SimpleStruct_doSomething(const struct SimpleStruct *const s);
#endif /* SIMPLE_H */
@@ -34,14 +34,14 @@ const SimpleStruct array[] = { { SIZEOF(simpleStruct, num),
// single line outside scope
-void SimpleStruct_construct(struct SimpleStruct * const s) {
+void SimpleStruct_construct(struct SimpleStruct *const s) {
// single line
s->num = 1;
s->name = "boo";
s->floatNum = 1.5;
}
-int ConnectParams_doSomething(const struct SimpleStruct * const s) {
+int ConnectParams_doSomething(const struct SimpleStruct *const s) {
/*
* multiline
*/
diff --git a/core/org.eclipse.cdt.ui.tests/resources/formatter/templates/After.cpp b/core/org.eclipse.cdt.ui.tests/resources/formatter/templates/After.cpp
index ef9a86282cd..159123ea3b6 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/formatter/templates/After.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/formatter/templates/After.cpp
@@ -13,16 +13,16 @@ class Foo {
// TEMPLATE_STRUCT
template<class Key, class Value, class SortAlgorithm = DefaultSort>
struct Map {
- Key* keys;
- Value* values;
- SortAlgorithm* sortAlgorithm;
+ Key *keys;
+ Value *values;
+ SortAlgorithm *sortAlgorithm;
Map();
};
// TEMPLATE_CLASS
template<class T> class nonVector {
private:
- T* head;
+ T *head;
public:
nonVector() {
@@ -65,7 +65,7 @@ template<class Bar> void Foo::fum(int i) {
}
// TEMPLATE_VARIABLES
-template<bool threads, int inst> char* default_alloc_template<threads, inst>::S_start_free =
+template<bool threads, int inst> char *default_alloc_template<threads, inst>::S_start_free =
0;
// an instantiation, not a template:
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantRefactoringTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantRefactoringTest.java
index bbbf5faed0c..0e1eec36d22 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantRefactoringTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantRefactoringTest.java
@@ -554,24 +554,24 @@ public class ExtractConstantRefactoringTest extends RefactoringTestBase {
//A.h
//class X {
// void method() {
- // char* a = /*$*/"sometext"/*$$*/;
+ // char *a = /*$*/"sometext"/*$$*/;
// }
//
// void method2() {
- // const char* b = "sometext";
+ // const char *b = "sometext";
// }
//};
//====================
//class X {
// void method() {
- // char* a = EXTRACTED;
+ // char *a = EXTRACTED;
// }
//
// void method2() {
- // const char* b = EXTRACTED;
+ // const char *b = EXTRACTED;
// }
//
- // static const char* EXTRACTED = "sometext";
+ // static const char *EXTRACTED = "sometext";
//};
public void testString() throws Exception {
assertRefactoringSuccess();
@@ -580,26 +580,26 @@ public class ExtractConstantRefactoringTest extends RefactoringTestBase {
//A.h
//class X {
// void method() {
- // wchar_t* a = /*$*/L"sometext"/*$$*/;
+ // wchar_t *a = /*$*/L"sometext"/*$$*/;
// }
//
// void method2() {
- // const wchar_t* b = L"sometext";
- // const char* c = "sometext";
+ // const wchar_t *b = L"sometext";
+ // const char *c = "sometext";
// }
//};
//====================
//class X {
// void method() {
- // wchar_t* a = EXTRACTED;
+ // wchar_t *a = EXTRACTED;
// }
//
// void method2() {
- // const wchar_t* b = EXTRACTED;
- // const char* c = "sometext";
+ // const wchar_t *b = EXTRACTED;
+ // const char *c = "sometext";
// }
//
- // static const wchar_t* EXTRACTED = L"sometext";
+ // static const wchar_t *EXTRACTED = L"sometext";
//};
public void testExtractConstantWideString() throws Exception {
assertRefactoringSuccess();
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionRefactoringTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionRefactoringTest.java
index 4c43dab6595..515459e3511 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionRefactoringTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionRefactoringTest.java
@@ -782,7 +782,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//
//private:
// int help();
- // void extracted(int* j);
+ // void extracted(int *j);
//};
//
//#endif /*A_H_*/
@@ -815,7 +815,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//A::~A() {
//}
//
- //void A::extracted(int* j) {
+ //void A::extracted(int *j) {
// ++*j;
// help();
//}
@@ -850,7 +850,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
// int j;
//};
//
- //int extracted(const struct A* a) {
+ //int extracted(const struct A *a) {
// return a->i + a->j;
//}
//
@@ -872,7 +872,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
// return i - j;
//}
//====================
- //void swap(int* i, int* j) {
+ //void swap(int *i, int *j) {
// int k = *i;
// *i = *j;
// *j = k;
@@ -907,7 +907,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//====================
//#include "A.h"
//
- //int extracted(A b, A* a) {
+ //int extracted(A b, A *a) {
// return a->method() + b.const_method();
//}
//
@@ -923,14 +923,14 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//A.h
//class A {
//public:
- // A(int i, const char* s);
+ // A(int i, const char *s);
// int method();
//};
//A.cpp
//#include "A.h"
//
- //void test(int i, const char* s) {
+ //void test(int i, const char *s) {
// /*$*/A a(i, s);/*$$*/
// if (i != 0)
// a.method();
@@ -938,12 +938,12 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//====================
//#include "A.h"
//
- //A extracted(int i, const char* s) {
+ //A extracted(int i, const char *s) {
// A a(i, s);
// return a;
//}
//
- //void test(int i, const char* s) {
+ //void test(int i, const char *s) {
// A a = extracted(i, s);
// if (i != 0)
// a.method();
@@ -979,7 +979,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//
//private:
// int help();
- // void extracted(int& i);
+ // void extracted(int &i);
//};
//
//#endif /*A_H_*/
@@ -1012,7 +1012,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//A::~A() {
//}
//
- //void A::extracted(int& i) {
+ //void A::extracted(int &i) {
// ++i;
// help();
//}
@@ -1143,7 +1143,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//
//private:
// int help();
- // int extracted(int i, int y, float x, B* b);
+ // int extracted(int i, int y, float x, B *b);
//};
//
//#endif /*A_H_*/
@@ -1160,7 +1160,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//int A::foo() {
// int i = 2;
// float x = i;
- // B* b = new B();
+ // B *b = new B();
// int y = x + i;
// /*$*/++i;
// b->hello(y);
@@ -1182,7 +1182,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//A::~A() {
//}
//
- //int A::extracted(int i, int y, float x, B* b) {
+ //int A::extracted(int i, int y, float x, B *b) {
// ++i;
// b->hello(y);
// i = i + x;
@@ -1193,7 +1193,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//int A::foo() {
// int i = 2;
// float x = i;
- // B* b = new B();
+ // B *b = new B();
// int y = x + i;
// i = extracted(i, y, x, b);
// ++x;
@@ -1238,7 +1238,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//
//private:
// int help();
- // bool extracted(bool y, float x, int& i, B* b);
+ // bool extracted(bool y, float x, int &i, B *b);
//};
//
//#endif /*A_H_*/
@@ -1255,7 +1255,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//int A::foo() {
// int i = 2;
// float x = i;
- // B* b = new B();
+ // B *b = new B();
// bool y = false;
// /*$*/++i;
// b->hello(y);
@@ -1279,7 +1279,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//A::~A() {
//}
//
- //bool A::extracted(bool y, float x, int& i, B* b) {
+ //bool A::extracted(bool y, float x, int &i, B *b) {
// ++i;
// b->hello(y);
// y = !y;
@@ -1291,7 +1291,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//int A::foo() {
// int i = 2;
// float x = i;
- // B* b = new B();
+ // B *b = new B();
// bool y = false;
// y = extracted(y, x, i, b);
// b->hello(y);
@@ -1350,7 +1350,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//
//private:
// int help();
- // float extracted(int& i, int y, float x, B* b);
+ // float extracted(int &i, int y, float x, B *b);
//};
//
//#endif /*A_H_*/
@@ -1367,7 +1367,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//int A::foo() {
// int i = 2;
// float x = i;
- // B* b = new B();
+ // B *b = new B();
// int y = x + i;
// /*$*/++i;
// b->hello(y);
@@ -1389,7 +1389,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//A::~A() {
//}
//
- //float A::extracted(int& i, int y, float x, B* b) {
+ //float A::extracted(int &i, int y, float x, B *b) {
// ++i;
// b->hello(y);
// i = i + x;
@@ -1400,7 +1400,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//int A::foo() {
// int i = 2;
// float x = i;
- // B* b = new B();
+ // B *b = new B();
// int y = x + i;
// x = extracted(i, y, x, b);
// ++x;
@@ -1459,7 +1459,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//
//private:
// int help();
- // B* extracted(int& i, int y, float x, B* b);
+ // B* extracted(int &i, int y, float x, B *b);
//};
//
//#endif /*A_H_*/
@@ -1499,7 +1499,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//A::~A() {
//}
//
- //B* A::extracted(int& i, int y, float x, B* b) {
+ //B* A::extracted(int &i, int y, float x, B *b) {
// ++i;
// b->hello(y);
// i = i + x;
@@ -1885,7 +1885,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//====================
//void print(int i, double a, double b);
//
- //extracted(double x, int i, double* y, double* s) {
+ //extracted(double x, int i, double *y, double *s) {
// x *= x;
// *y *= i;
// *s += x / *y;
@@ -1972,7 +1972,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
// goto loop4;
//}
//====================
- //int extracted(int a, int b, int* c, int* d) {
+ //int extracted(int a, int b, int *c, int *d) {
// a++;
// b++;
// *c++;
@@ -2107,7 +2107,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//int main() {
// int m_capacity;
// /*$*/m_capacity += INITIAL_CAPACITY;
- // string* newElements = new string[m_capacity];/*$$*/
+ // string *newElements = new string[m_capacity];/*$$*/
// newElements[0] = "s";
//}
//====================
@@ -2119,13 +2119,13 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//
//string* runTest(int m_capacity) {
// m_capacity += INITIAL_CAPACITY;
- // string* newElements = new string[m_capacity];
+ // string *newElements = new string[m_capacity];
// return newElements;
//}
//
//int main() {
// int m_capacity;
- // string* newElements = runTest(m_capacity);
+ // string *newElements = runTest(m_capacity);
// newElements[0] = "s";
//}
public void testStringArray() throws Exception {
@@ -2141,7 +2141,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//public:
// A();
// virtual ~A();
- // int foo(int& a);
+ // int foo(int &a);
//};
//
//#endif /*A_H_*/
@@ -2153,10 +2153,10 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//public:
// A();
// virtual ~A();
- // int foo(int& a);
+ // int foo(int &a);
//
//private:
- // void extracted(int b, int c, int& a);
+ // void extracted(int b, int c, int &a);
//};
//
//#endif /*A_H_*/
@@ -2170,7 +2170,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//A::~A() {
//}
//
- //int A::foo(int& a) {
+ //int A::foo(int &a) {
// int b = 7;
// int c = 8;
// /*$*/a = b + c;/*$$*/
@@ -2185,11 +2185,11 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//A::~A() {
//}
//
- //void A::extracted(int b, int c, int& a) {
+ //void A::extracted(int b, int c, int &a) {
// a = b + c;
//}
//
- //int A::foo(int& a) {
+ //int A::foo(int &a) {
// int b = 7;
// int c = 8;
// extracted(b, c, a);
@@ -2301,7 +2301,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//====================
//#include "Test.h"
//
- //const A::B* extracted(A* x, const char* y) {
+ //const A::B* extracted(A *x, const char *y) {
// return x->m(y);
//}
//
@@ -3051,7 +3051,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//
//private:
// int help();
- // int extracted(int j, int& a);
+ // int extracted(int j, int &a);
//};
//
//#endif /*A_H_*/
@@ -3093,7 +3093,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
// i = extracted(i, j);
//}
//
- //int A::extracted(int j, int& a) {
+ //int A::extracted(int j, int &a) {
// j++;
// a++;
// help();
@@ -3241,7 +3241,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//
//private:
// int help();
- // int extracted(int i, float& j);
+ // int extracted(int i, float &j);
//};
//
//#endif /*A_H_*/
@@ -3287,7 +3287,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
// blabla += 1;
//}
//
- //int A::extracted(int i, float& j) {
+ //int A::extracted(int i, float &j) {
// ++i;
// j += 1;
// help();
@@ -3425,7 +3425,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//
//private:
// int help();
- // void extracted(int& i, float j);
+ // void extracted(int &i, float j);
//};
//
//#endif /*A_H_*/
@@ -3468,7 +3468,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
// extracted(oo, blabla);
//}
//
- //void A::extracted(int& i, float j) {
+ //void A::extracted(int &i, float j) {
// ++i;
// j += 1;
// help();
@@ -3604,7 +3604,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//
//private:
// int help();
- // int extracted(int i, int y, float x, B* b);
+ // int extracted(int i, int y, float x, B *b);
//};
//
//#endif /*A_H_*/
@@ -3618,7 +3618,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//A::~A() {
// int i = 2;
// float x = i;
- // B* b = new B();
+ // B *b = new B();
// int y = x + i;
// ++i;
// b->hello(y);
@@ -3632,7 +3632,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//int A::foo() {
// int i = 2;
// float x = i;
- // B* b = new B();
+ // B *b = new B();
// int y = x + i;
// /*$*/++i;
// b->hello(y);
@@ -3655,7 +3655,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//A::~A() {
// int i = 2;
// float x = i;
- // B* b = new B();
+ // B *b = new B();
// int y = x + i;
// i = extracted(i, y, x, b);
// b->hello(y);
@@ -3663,7 +3663,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
// i++;
//}
//
- //int A::extracted(int i, int y, float x, B* b) {
+ //int A::extracted(int i, int y, float x, B *b) {
// ++i;
// b->hello(y);
// i = i + x;
@@ -3674,7 +3674,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//int A::foo() {
// int i = 2;
// float x = i;
- // B* b = new B();
+ // B *b = new B();
// int y = x + i;
// i = extracted(i, y, x, b);
// b->hello(y);
@@ -3733,7 +3733,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//
//private:
// int help();
- // int extracted(int i, int y, float x, B* b);
+ // int extracted(int i, int y, float x, B *b);
//};
//
//#endif /*A_H_*/
@@ -3747,7 +3747,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//A::~A() {
// int i = 2;
// float x = i;
- // B* b = new B();
+ // B *b = new B();
// int y = x + i;
// ++i;
// b->hello(y);
@@ -3761,7 +3761,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//int A::foo() {
// int i = 2;
// float x = i;
- // B* b = new B();
+ // B *b = new B();
// int y = x + i;
// /*$*/++i;
// b->hello(y);
@@ -3783,7 +3783,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//A::~A() {
// int i = 2;
// float x = i;
- // B* b = new B();
+ // B *b = new B();
// int y = x + i;
// i = extracted(i, y, x, b);
// b->hello(y);
@@ -3791,7 +3791,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
// i++;
//}
//
- //int A::extracted(int i, int y, float x, B* b) {
+ //int A::extracted(int i, int y, float x, B *b) {
// ++i;
// b->hello(y);
// i = i + x;
@@ -3802,7 +3802,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//int A::foo() {
// int i = 2;
// float x = i;
- // B* b = new B();
+ // B *b = new B();
// int y = x + i;
// i = extracted(i, y, x, b);
// b->hello(y);
@@ -4143,7 +4143,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//
//private:
// int help();
- // int extracted(int& i, int b);
+ // int extracted(int &i, int b);
//};
//
//#endif /*A_H_*/
@@ -4183,7 +4183,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
//A::~A() {
//}
//
- //int A::extracted(int& i, int b) {
+ //int A::extracted(int &i, int b) {
// ++i;
// help();
// ADD(b);
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractlocalvariable/ExtractLocalVariableRefactoringTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractlocalvariable/ExtractLocalVariableRefactoringTest.java
index 6818907ded3..7aebbb10c79 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractlocalvariable/ExtractLocalVariableRefactoringTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractlocalvariable/ExtractLocalVariableRefactoringTest.java
@@ -86,7 +86,7 @@ public class ExtractLocalVariableRefactoringTest extends RefactoringTestBase {
//}
//====================
//const char* foo() {
- // const char* helloWorld = "Hello World!";
+ // const char *helloWorld = "Hello World!";
// return helloWorld;
//}
public void testStringLiteral() throws Exception {
@@ -269,7 +269,7 @@ public class ExtractLocalVariableRefactoringTest extends RefactoringTestBase {
//====================
//void foo() {
// int a[2];
- // int* i = a + 1;
+ // int *i = a + 1;
// int b = *i;
//}
public void testPointer() throws Exception {
@@ -277,16 +277,16 @@ public class ExtractLocalVariableRefactoringTest extends RefactoringTestBase {
}
//A.cpp
- //const volatile int* k;
+ //const volatile int *k;
//
//void foo() {
// /*$*/k;/*$$*/
//}
//====================
- //const volatile int* k;
+ //const volatile int *k;
//
//void foo() {
- // const volatile int* k0 = k;
+ // const volatile int *k0 = k;
// k0;
//}
public void testQualifiers() throws Exception {
@@ -328,7 +328,7 @@ public class ExtractLocalVariableRefactoringTest extends RefactoringTestBase {
//
//void func() {
// int* (*a)[2];
- // int* (*a0)[2] = a;
+ // int *(*a0)[2] = a;
// a0;
//}
public void testArrayOfFunctionPointers_Bug318784() throws Exception {
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/gettersandsetters/GenerateGettersAndSettersTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/gettersandsetters/GenerateGettersAndSettersTest.java
index 5dfa2671daf..4c4e40fd3aa 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/gettersandsetters/GenerateGettersAndSettersTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/gettersandsetters/GenerateGettersAndSettersTest.java
@@ -303,7 +303,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// int systemId;
//
//protected:
- // char* name;
+ // char *name;
//
//public:
// const int socSecNo;
@@ -314,7 +314,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//
// ~Person(); // destructor
//
- // char* Name();
+ // char *Name();
//
// void Print();
//
@@ -343,7 +343,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// int systemId;
//
//protected:
- // char* name;
+ // char *name;
//
//public:
// const int socSecNo;
@@ -354,7 +354,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//
// ~Person(); // destructor
//
- // char* Name();
+ // char *Name();
//
// void Print();
//
@@ -370,7 +370,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// this->systemId = systemId;
// }
//
- // void setName(char* name) {
+ // void setName(char *name) {
// this->name = name;
// }
//};
@@ -386,7 +386,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// return socSecNo;
//}
//
- //int main(int argc, char** argv) {
+ //int main(int argc, char **argv) {
//}
//====================
public void testOneSetterSelection() throws Exception {
@@ -403,7 +403,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// int systemId;
//
//protected:
- // char* name;
+ // char *name;
//
//public:
// const int socSecNo;
@@ -414,7 +414,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//
// ~Person(); // destructor
//
- // char* Name();
+ // char *Name();
//
// void Print();
//
@@ -443,7 +443,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// int systemId;
//
//protected:
- // char* name;
+ // char *name;
//
//public:
// const int socSecNo;
@@ -454,7 +454,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//
// ~Person(); // destructor
//
- // char* Name();
+ // char *Name();
//
// void Print();
//
@@ -474,7 +474,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// return name;
// }
//
- // void setName(char* name) {
+ // void setName(char *name) {
// this->name = name;
// }
//};
@@ -490,7 +490,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// return socSecNo;
//}
//
- //int main(int argc, char** argv) {
+ //int main(int argc, char **argv) {
//}
//====================
public void testGetterAndSetterSelection() throws Exception {
@@ -508,7 +508,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// int systemId;
//
//protected:
- // char* name;
+ // char *name;
//
//public:
// const int socSecNo;
@@ -519,7 +519,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//
// ~Person(); // destructor
//
- // char* Name();
+ // char *Name();
//
// void Print();
//
@@ -540,7 +540,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// int systemId;
//
//protected:
- // char* name;
+ // char *name;
//
//public:
// const int socSecNo;
@@ -551,7 +551,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//
// ~Person(); // destructor
//
- // char* Name();
+ // char *Name();
//
// void Print();
//
@@ -563,7 +563,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// return name;
// }
//
- // void setName(char* name) {
+ // void setName(char *name) {
// this->name = name;
// }
//
@@ -587,7 +587,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// return socSecNo;
//}
//
- //int main(int argc, char** argv) {
+ //int main(int argc, char **argv) {
//}
//====================
public void testMultipleSelection() throws Exception {
@@ -781,9 +781,9 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//#define A_H_
//
//struct FullName {
- // const char* first;
- // const char* last;
- // FullName(const FullName& other);
+ // const char *first;
+ // const char *last;
+ // FullName(const FullName &other);
// ~FullName();
//};
//
@@ -803,7 +803,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//
// ~Person(); // destructor
//
- // char* Name();
+ // char *Name();
//
// void Print();
//
@@ -824,9 +824,9 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//#define A_H_
//
//struct FullName {
- // const char* first;
- // const char* last;
- // FullName(const FullName& other);
+ // const char *first;
+ // const char *last;
+ // FullName(const FullName &other);
// ~FullName();
//};
//
@@ -846,7 +846,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//
// ~Person(); // destructor
//
- // char* Name();
+ // char *Name();
//
// void Print();
//
@@ -858,7 +858,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//
// void setSystemId(int systemId);
// const FullName& getName() const;
- // void setName(const FullName& name);
+ // void setName(const FullName &name);
//};
//
//int gooo = 1;
@@ -872,7 +872,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// return socSecNo;
//}
//
- //int main(int argc, char** argv) {
+ //int main(int argc, char **argv) {
//}
//====================
//#include "A.h"
@@ -881,7 +881,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// return name;
//}
//
- //void Person::setName(const FullName& name) {
+ //void Person::setName(const FullName &name) {
// this->name = name;
//}
//
@@ -889,7 +889,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// return socSecNo;
//}
//
- //int main(int argc, char** argv) {
+ //int main(int argc, char **argv) {
//}
public void testPassByReferenceSeparateDefinition() throws Exception {
definitionSeparate = true;
@@ -1034,7 +1034,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// int systemId;
//
//protected:
- // char* name;
+ // char *name;
//
//public:
// const int socSecNo;
@@ -1045,7 +1045,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//
// ~Person(); // destructor
//
- // char* Name();
+ // char *Name();
//
// void Print();
//
@@ -1074,7 +1074,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// int systemId;
//
//protected:
- // char* name;
+ // char *name;
//
//public:
// const int socSecNo;
@@ -1085,7 +1085,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//
// ~Person(); // destructor
//
- // char* Name();
+ // char *Name();
//
// void Print();
//
@@ -1101,7 +1101,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// this->systemId = systemId;
// }
//
- // void setName(char* name);
+ // void setName(char *name);
//};
//
//int gooo = 1;
@@ -1115,12 +1115,12 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// return socSecNo;
//}
//
- //int main(int argc, char** argv) {
+ //int main(int argc, char **argv) {
//}
//====================
//#include "A.h"
//
- //void Person::setName(char* name) {
+ //void Person::setName(char *name) {
// this->name = name;
//}
//
@@ -1128,7 +1128,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// return socSecNo;
//}
//
- //int main(int argc, char** argv) {
+ //int main(int argc, char **argv) {
//}
public void testOneSetterSelectionSeparateDefinition() throws Exception {
definitionSeparate = true;
@@ -1145,7 +1145,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// int systemId;
//
//protected:
- // char* name;
+ // char *name;
//
//public:
// const int socSecNo;
@@ -1156,7 +1156,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//
// ~Person(); // destructor
//
- // char* Name();
+ // char *Name();
//
// void Print();
//
@@ -1185,7 +1185,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// int systemId;
//
//protected:
- // char* name;
+ // char *name;
//
//public:
// const int socSecNo;
@@ -1196,7 +1196,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
//
// ~Person(); // destructor
//
- // char* Name();
+ // char *Name();
//
// void Print();
//
@@ -1213,7 +1213,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// }
//
// char* getName() const;
- // void setName(char* name);
+ // void setName(char *name);
//};
//
//int gooo = 1;
@@ -1227,7 +1227,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// return socSecNo;
//}
//
- //int main(int argc, char** argv) {
+ //int main(int argc, char **argv) {
//}
//====================
//#include "A.h"
@@ -1236,7 +1236,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// return name;
//}
//
- //void Person::setName(char* name) {
+ //void Person::setName(char *name) {
// this->name = name;
//}
//
@@ -1244,7 +1244,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// return socSecNo;
//}
//
- //int main(int argc, char** argv) {
+ //int main(int argc, char **argv) {
//}
public void testSelectionWithSeparateDefinition() throws Exception {
definitionSeparate = true;
@@ -1618,7 +1618,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTestBase {
// return b;
// }
//
- // void setB(int* b) {
+ // void setB(int *b) {
// this->b = b;
// }
//
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/implementmethod/ImplementMethodRefactoringTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/implementmethod/ImplementMethodRefactoringTest.java
index d08b9778366..3f1c4479712 100755
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/implementmethod/ImplementMethodRefactoringTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/implementmethod/ImplementMethodRefactoringTest.java
@@ -615,7 +615,7 @@ public class ImplementMethodRefactoringTest extends RefactoringTestBase {
//
//class TestClass {
//public:
- // /*$*/int* get(char* val);/*$$*/
+ // /*$*/int* get(char *val);/*$$*/
//};
//
@@ -624,7 +624,7 @@ public class ImplementMethodRefactoringTest extends RefactoringTestBase {
//====================
//#include "A.h"
//
- //int* TestClass::get(char* val) {
+ //int* TestClass::get(char *val) {
//}
public void testPointerReturnValue_Bug238253() throws Exception {
assertRefactoringSuccess();
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/includes/IncludeOrganizerTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/includes/IncludeOrganizerTest.java
index 5d4ccece430..8355708367d 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/includes/IncludeOrganizerTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/includes/IncludeOrganizerTest.java
@@ -700,7 +700,7 @@ public class IncludeOrganizerTest extends IncludesTestBase {
//namespace ns3 {
//namespace ns2 {
//namespace ns1 {
- //C * f(const A &a, B *b);
+ //C* f(const A &a, B *b);
//} /* namespace ns1 */
//} /* namespace ns2 */
//} /* namespace ns3 */
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/overridemethods/OverrideMethodsRefactoringTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/overridemethods/OverrideMethodsRefactoringTest.java
index a805f0346d2..87d564f1254 100755
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/overridemethods/OverrideMethodsRefactoringTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/overridemethods/OverrideMethodsRefactoringTest.java
@@ -137,7 +137,7 @@ public class OverrideMethodsRefactoringTest extends RefactoringTestBase {
//class Base {
//public:
// virtual ~Base();
- // virtual void baseFunc(Base* ptr) const = 0;
+ // virtual void baseFunc(Base *ptr) const = 0;
//};
//};
//namespace SECOND {
@@ -152,14 +152,14 @@ public class OverrideMethodsRefactoringTest extends RefactoringTestBase {
//class Base {
//public:
// virtual ~Base();
- // virtual void baseFunc(Base* ptr) const = 0;
+ // virtual void baseFunc(Base *ptr) const = 0;
//};
//};
//namespace SECOND {
//class X: public FIRST::Base {
//public:
// X();
- // virtual void baseFunc(FIRST::Base* ptr) const;
+ // virtual void baseFunc(FIRST::Base *ptr) const;
//};
//};
@@ -168,7 +168,7 @@ public class OverrideMethodsRefactoringTest extends RefactoringTestBase {
//====================
//#include "A.h"
//
- //void SECOND::X::baseFunc(FIRST::Base* ptr) const {
+ //void SECOND::X::baseFunc(FIRST::Base *ptr) const {
//}
public void testWithMixedNamespaceHeaderAndSource() throws Exception {
selectedMethods = new String[] { "baseFunc(FIRST::Base *)const" };
@@ -538,7 +538,7 @@ public class OverrideMethodsRefactoringTest extends RefactoringTestBase {
//class Base {
//public:
// virtual ~Base();
- // virtual void* baseFunc(void* ptr) const = 0;
+ // virtual void* baseFunc(void *ptr) const = 0;
//};
//class X: public Base {
//public:
@@ -549,12 +549,12 @@ public class OverrideMethodsRefactoringTest extends RefactoringTestBase {
//class Base {
//public:
// virtual ~Base();
- // virtual void* baseFunc(void* ptr) const = 0;
+ // virtual void* baseFunc(void *ptr) const = 0;
//};
//class X: public Base {
//public:
// X();
- // virtual void* baseFunc(void* ptr) const;
+ // virtual void* baseFunc(void *ptr) const;
//};
//A.cpp
@@ -562,7 +562,7 @@ public class OverrideMethodsRefactoringTest extends RefactoringTestBase {
//====================
//#include "A.h"
//
- //void* X::baseFunc(void* ptr) const {
+ //void* X::baseFunc(void *ptr) const {
//}
public void testWithPointers() throws Exception {
selectedMethods = new String[] { "baseFunc(void *)const" };
@@ -573,7 +573,7 @@ public class OverrideMethodsRefactoringTest extends RefactoringTestBase {
//class Base {
//public:
// virtual ~Base();
- // virtual void* baseFunc(void* ptr) const = 0, method2();
+ // virtual void* baseFunc(void *ptr) const = 0, method2();
//};
//class X: public Base {
//public:
@@ -584,12 +584,12 @@ public class OverrideMethodsRefactoringTest extends RefactoringTestBase {
//class Base {
//public:
// virtual ~Base();
- // virtual void* baseFunc(void* ptr) const = 0, method2();
+ // virtual void* baseFunc(void *ptr) const = 0, method2();
//};
//class X: public Base {
//public:
// X();
- // virtual void* baseFunc(void* ptr) const;
+ // virtual void* baseFunc(void *ptr) const;
//};
//A.cpp
@@ -597,7 +597,7 @@ public class OverrideMethodsRefactoringTest extends RefactoringTestBase {
//====================
//#include "A.h"
//
- //void* X::baseFunc(void* ptr) const {
+ //void* X::baseFunc(void *ptr) const {
//}
public void testWithMultipleMethodsOnSameLine() throws Exception {
selectedMethods = new String[] { "baseFunc(void *)const" };
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/togglefunction/ToggleRefactoringTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/togglefunction/ToggleRefactoringTest.java
index e2cfbd2bcd4..3a0c764b337 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/togglefunction/ToggleRefactoringTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/togglefunction/ToggleRefactoringTest.java
@@ -632,7 +632,7 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
//class A {
//public:
// template<typename U, typename V>
- // void /*$*/foo/*$$*/(const U& u, const V& v) {
+ // void /*$*/foo/*$$*/(const U &u, const V &v) {
// return;
// }
//};
@@ -641,12 +641,12 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
//class A {
//public:
// template<typename U, typename V>
- // void foo(const U& u, const V& v);
+ // void foo(const U &u, const V &v);
//};
//
//template<typename T, typename S>
//template<typename U, typename V>
- //inline void A<T, S>::foo(const U& u, const V& v) {
+ //inline void A<T, S>::foo(const U &u, const V &v) {
// return;
//}
public void testTestComplexTemplateFunctionFromInClassToInHeader() throws Exception {
@@ -663,7 +663,7 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
//
//template<typename T, typename S>
//template<typename U, typename V>
- //inline void A<T,S>::foo(const U& u, const V& v) {
+ //inline void A<T,S>::foo(const U &u, const V &v) {
// return;
//}
//====================
@@ -671,7 +671,7 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
//class A {
//public:
// template<typename U, typename V>
- // void foo(const U& u, const V& v) {
+ // void foo(const U &u, const V &v) {
// return;
// }
//};
@@ -959,7 +959,7 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
// try {
// return;
// }
- // catch (std::exception& e1){
+ // catch (std::exception &e1){
// return;
// }
//};
@@ -975,7 +975,7 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
//try {
// return;
//}
- //catch (std::exception& e1) {
+ //catch (std::exception &e1) {
// return;
//}
public void testTestTryCatchFromInClassToInHeader() throws Exception {
@@ -1022,7 +1022,7 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
//try {
// return;
//}
- //catch (std::exception& e1) {
+ //catch (std::exception &e1) {
// return;
//}
public void testTestTryCatchFromInHeaderToImplementation() throws Exception {
@@ -1066,7 +1066,7 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
// try {
// return;
// }
- // catch (std::exception& e1) {
+ // catch (std::exception &e1) {
// return;
// }
//};
@@ -1083,10 +1083,10 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
// try {
// return;
// }
- // catch (std::exception& e1) {
+ // catch (std::exception &e1) {
// return;
// }
- // catch (std::exception& e2) {
+ // catch (std::exception &e2) {
// return;
// }
//};
@@ -1102,10 +1102,10 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
//try {
// return;
//}
- //catch (std::exception& e1) {
+ //catch (std::exception &e1) {
// return;
//}
- //catch (std::exception& e2) {
+ //catch (std::exception &e2) {
// return;
//}
public void testTestMultipleTryCatchFromInClassToInHeader() throws Exception {
@@ -1155,10 +1155,10 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
//try {
// return;
//}
- //catch (std::exception& e1) {
+ //catch (std::exception &e1) {
// return;
//}
- //catch (std::exception& e2) {
+ //catch (std::exception &e2) {
// return;
//}
public void testTestMultipleTryCatchFromInHeaderToImplementation() throws Exception {
@@ -1205,10 +1205,10 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
// try {
// return;
// }
- // catch (std::exception& e1) {
+ // catch (std::exception &e1) {
// return;
// }
- // catch (std::exception& e2) {
+ // catch (std::exception &e2) {
// return;
// }
//};
@@ -1787,7 +1787,7 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
// }
//};
//
- //int freeFunction(int* a, int& b);
+ //int freeFunction(int *a, int &b);
//A.cpp
//#include "A.h"
@@ -1802,7 +1802,7 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
// return 0;
//}
//
- //int freeFunction(int* a, int& b) {
+ //int freeFunction(int *a, int &b) {
// return 42;
//}
public void testTestFreeFunctionToggleFromHeaderToImplementation() throws Exception {
@@ -1842,7 +1842,7 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
// }
//};
//
- //int freeFunction(int* a, int& b);
+ //int freeFunction(int *a, int &b);
//====================
//#include <iostream>
//
@@ -1859,7 +1859,7 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
// }
//};
//
- //int freeFunction(int* a, int& b) {
+ //int freeFunction(int *a, int &b) {
// return 42;
//}
public void testTestFreeFunctionToggleFromImplementationToHeaderWithDeclaration() throws Exception {
@@ -1917,11 +1917,11 @@ public class ToggleRefactoringTest extends RefactoringTestBase {
// }
//};
//
- //int freeFunction(int* a, int& b)
+ //int freeFunction(int *a, int &b)
//try {
// return 42;
//}
- //catch (std::exception& e) {
+ //catch (std::exception &e) {
//}
public void testTestFreeFunctionToggleFromImplementationToHeaderWithOutDeclaration() throws Exception {
assertRefactoringSuccess();
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CodeFormatterTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CodeFormatterTest.java
index 37a33867ae8..e612154189f 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CodeFormatterTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CodeFormatterTest.java
@@ -142,7 +142,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//pvar;
//int var;
- //int* pvar;
+ //int *pvar;
public void testSpaceBetweenTypeAndIdentifier_Bug194603() throws Exception {
assertFormatterResult();
}
@@ -229,7 +229,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//};
//
//void test() {
- // ClassWithALongName* variable_with_a_long_name;
+ // ClassWithALongName *variable_with_a_long_name;
// for (ClassWithALongName::Iterator iter_for_class_with_a_long_name =
// variable_with_a_long_name->getIterator();
// !iter_for_class_with_a_long_name.isDone();
@@ -416,7 +416,7 @@ public class CodeFormatterTest extends BaseUITestCase {
// return 2;
//}
- //int main(int argc, char const int* argv[])
+ //int main(int argc, char const int *argv[])
//try {
// for (int i = 1; i < argc; ++i) {
// }
@@ -434,7 +434,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//int main(int argc, char const int * argv[]) { try { for (int i = 1; i < argc; ++i) { } return 0; } catch (float e) { return 1; } catch (...) { return 2; } }
- //int main(int argc, char const int * argv[]) {
+ //int main(int argc, char const int *argv[]) {
// try {
// for (int i = 1; i < argc; ++i) {
// }
@@ -556,7 +556,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//void f() {
// int *px = ::new int(0);
- // int* py[] = new int[5](0, 1, 2, 3, 4);
+ // int *py[] = new int[5](0, 1, 2, 3, 4);
// int *pz[] = new (px) int(0);
// delete[] py;
// ::delete px;
@@ -600,11 +600,11 @@ public class CodeFormatterTest extends BaseUITestCase {
//static void* h();
//int* (*a) [2];
- //static void *f() {
+ //static void* f() {
//}
- //static void * g();
+ //static void* g();
//static void* h();
- //int* (*a)[2];
+ //int *(*a)[2];
public void testSpaceBetweenDeclSpecAndDeclarator() throws Exception {
assertFormatterResult();
}
@@ -701,7 +701,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//};
//
//void test() {
- // ClassWithALongName* variable_with_a_long_name =
+ // ClassWithALongName *variable_with_a_long_name =
// variable_with_a_long_name->methodWithAQuiteLongName();
// variable_with_a_long_name =
// variable_with_a_long_name->methodWithAQuiteLongName();
@@ -731,8 +731,8 @@ public class CodeFormatterTest extends BaseUITestCase {
//};
//
//void test() {
- // ClassWithALongName* variable_with_a_long_name;
- // ClassWithALongName* another_variable = variable_with_a_long_name
+ // ClassWithALongName *variable_with_a_long_name;
+ // ClassWithALongName *another_variable = variable_with_a_long_name
// ->methodWithALongName()->anotherMethodWithALongName();
//}
public void testMemberAccess() throws Exception {
@@ -831,7 +831,7 @@ public class CodeFormatterTest extends BaseUITestCase {
// EAbout
// };
//
- //CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+ //CActiveScheduler *scheduler = new (ELeave) CActiveScheduler();
public void testFormatterRegressions_Bug225858() throws Exception {
fOptions.putAll(DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap());
assertFormatterResult();
@@ -1044,14 +1044,14 @@ public class CodeFormatterTest extends BaseUITestCase {
// if (D::iterator it = m.find(e))
// m.erase(it);
//}
- //T* A::b(T* t) {
+ //T* A::b(T *t) {
// S::iterator it = m.find(t);
// if (!it)
// return NULL;
// else
// return *it;
//}
- //M* A::c(M* tm) {
+ //M* A::c(M *tm) {
// N::iterator it = myN.find(tm);
// if (!it)
// return NULL;
@@ -1087,13 +1087,13 @@ public class CodeFormatterTest extends BaseUITestCase {
//void f3(const char* long_parameter_name,int very_loooooooooooong_parameter_name,int very_loong_parameter_name) ;
//void f4(const char* long_parameter_name, int very_loooooooooooong_parameter_name,int very_looong_parameter_name) ;
- //void f1(const char* long_parameter_name, int very_looooooooooong_parameter_name,
+ //void f1(const char *long_parameter_name, int very_looooooooooong_parameter_name,
// int another_parameter_name);
- //void f2(const char* long_parameter_name,
+ //void f2(const char *long_parameter_name,
// int very_loooooooooooong_parameter_name, int another_parameter_name);
- //void f3(const char* long_parameter_name,
+ //void f3(const char *long_parameter_name,
// int very_loooooooooooong_parameter_name, int very_loong_parameter_name);
- //void f4(const char* long_parameter_name,
+ //void f4(const char *long_parameter_name,
// int very_loooooooooooong_parameter_name,
// int very_looong_parameter_name);
public void testFunctionDeclaration() throws Exception {
@@ -1108,11 +1108,11 @@ public class CodeFormatterTest extends BaseUITestCase {
//const char* function_name2(const char* parameter_name, const char* another_parameter_name,
//int very_looooooooooooooooooooooooong_parameter_name);
- //const char* function_name1(const char* parameter_name,
- // const char* another_parameter_name,
+ //const char* function_name1(const char *parameter_name,
+ // const char *another_parameter_name,
// int very_loooooooooooooooooooooooong_parameter_name);
//const char* function_name2(
- // const char* parameter_name, const char* another_parameter_name,
+ // const char *parameter_name, const char *another_parameter_name,
// int very_looooooooooooooooooooooooong_parameter_name);
public void testFunctionDeclarationFallbackFormat() throws Exception {
fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
@@ -1131,8 +1131,8 @@ public class CodeFormatterTest extends BaseUITestCase {
//#define ABSTRACT = 0
//
//class A {
- // virtual bool function_with_a_loooooong_name(const char* parameter) ABSTRACT;
- // virtual bool function_with_a_looooooong_name(const char* parameter)
+ // virtual bool function_with_a_loooooong_name(const char *parameter) ABSTRACT;
+ // virtual bool function_with_a_looooooong_name(const char *parameter)
// ABSTRACT;
//};
public void testFunctionDeclarationTrailingMacro_1() throws Exception {
@@ -1168,9 +1168,9 @@ public class CodeFormatterTest extends BaseUITestCase {
//void f1(const char* long_parameter_name,int very_looooooooong_parameter_name){}
//void f2(const char* long_parameter_name,int very_loooooooooong_parameter_name){}
- //void f1(const char* long_parameter_name, int very_looooooooong_parameter_name) {
+ //void f1(const char *long_parameter_name, int very_looooooooong_parameter_name) {
//}
- //void f2(const char* long_parameter_name,
+ //void f2(const char *long_parameter_name,
// int very_loooooooooong_parameter_name) {
//}
public void testFunctionDefinition() throws Exception {
@@ -1322,14 +1322,14 @@ public class CodeFormatterTest extends BaseUITestCase {
assertFormatterResult();
}
- //void function(const char* s);
+ //void function(const char *s);
//
//void test() {
//function("string literal"
//"continuation of the string literal");
//}
- //void function(const char* s);
+ //void function(const char *s);
//
//void test() {
// function("string literal"
@@ -1548,9 +1548,9 @@ public class CodeFormatterTest extends BaseUITestCase {
assertFormatterResult();
}
- //char *b, * const a;
+ //char *b, *const a;
- //char *b, * const a;
+ //char *b, *const a;
public void testPreserveSpaceBetweenPointerModifierAndIdentifier_Bug243056() throws Exception {
assertFormatterResult();
}
@@ -2204,7 +2204,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//#define new new(__FILE__, __LINE__)
//void func() {
- // char* a = new char[10];
+ // char *a = new char[10];
//}
public void testPlacementNewAsMacro_Bug298593() throws Exception {
assertFormatterResult();
@@ -2227,7 +2227,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//if (x == 0) x = 5;}
//void f() {
- // w_char* p = L"wide string literal";
+ // w_char *p = L"wide string literal";
// int x = 0;
// if (x == 0)
// x = 5;
@@ -2305,7 +2305,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//void f() {
// int array[5] = { 1, 2, 3, 4, 5 };
- // for (int& x : array)
+ // for (int &x : array)
// x *= 2;
//}
public void testRangeBasedFor_Bug328472() throws Exception {
@@ -2506,7 +2506,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//}
//class Stream {
- // Stream& operator<<(const char* s);
+ // Stream& operator<<(const char *s);
//};
//
//class Voidifier {
@@ -2544,7 +2544,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//}
//class Stream {
- // Stream& operator<<(const char* s);
+ // Stream& operator<<(const char *s);
//};
//
//class Voidifier {
@@ -2568,7 +2568,7 @@ public class CodeFormatterTest extends BaseUITestCase {
}
//class Stream {
- //Stream& operator<<(const char* s);
+ //Stream& operator<<(const char *s);
//};
//const char* function();
//
@@ -2578,7 +2578,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//}
//class Stream {
- // Stream& operator<<(const char* s);
+ // Stream& operator<<(const char *s);
//};
//const char* function();
//
@@ -2595,7 +2595,7 @@ public class CodeFormatterTest extends BaseUITestCase {
}
//class Stream {
- //Stream& operator<<(const char* s);
+ //Stream& operator<<(const char *s);
//Stream& operator<<(int i);
//};
//
@@ -2608,7 +2608,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//}
//class Stream {
- // Stream& operator<<(const char* s);
+ // Stream& operator<<(const char *s);
// Stream& operator<<(int i);
//};
//
@@ -2727,7 +2727,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//
//#define MY_MACRO(a) (a) ? (void) 0 : Voidifier() & GetStream() << " "
//
- //void test(const char* variable_with_a_loooong_name) {
+ //void test(const char *variable_with_a_loooong_name) {
// MY_MACRO(loooooooooooong_name(loooong_name,
// very_loooooooooooooooooooooooong_name))
// << variable_with_a_loooong_name;
@@ -2961,7 +2961,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//struct {
// int n;
- //}* l;
+ //} *l;
//void f(int p0, int p1) {
// f((p0 + 2), l->n);
//}
@@ -3830,7 +3830,7 @@ public class CodeFormatterTest extends BaseUITestCase {
// }
//};
////explicit instantiation
- //template bool data::operator< <int>(int const &) const;
+ //template bool data::operator< <int>(int const&) const;
//class data {
//public:
@@ -3839,7 +3839,7 @@ public class CodeFormatterTest extends BaseUITestCase {
// }
//};
////explicit instantiation
- //template bool data::operator< <int>(int const &) const;
+ //template bool data::operator< <int>(int const&) const;
public void testTemplateInstantiationOperatorLesser_Bug540252() throws Exception {
assertFormatterResult();
}
@@ -3865,7 +3865,7 @@ public class CodeFormatterTest extends BaseUITestCase {
//void func() {
// try {
// WW("1") << "2";
- // } catch (const std::exception& e) {
+ // } catch (const std::exception &e) {
// std::cout << "blah...." << std::endl;
// }
//}

Back to the top