From 174a5c511206b614538f6e7eef0e736f1a8b3771 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Wed, 24 Oct 2012 16:12:55 +0200 Subject: [PATCH] Cosmetics. --- .../core/parser/tests/ast2/AST2CPPTests.java | 910 +++++++++--------- 1 file changed, 455 insertions(+), 455 deletions(-) diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java index 8b8da5697d4..33d4ff663f6 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java @@ -731,7 +731,7 @@ public class AST2CPPTests extends AST2BaseTest { // class A a; // } public void testNameHiding() throws Exception { - String content= getAboveComment(); + String content= getAboveComment(); IASTTranslationUnit tu = parse(content, ParserLanguage.CPP); CPPNameCollector collector = new CPPNameCollector(); @@ -1038,13 +1038,13 @@ public class AST2CPPTests extends AST2BaseTest { IFunction f = (IFunction) decl.getDeclarators()[0].getName().resolveBinding(); decl = (IASTSimpleDeclaration) tu.getDeclarations()[2]; - IVariable g = (IVariable) decl.getDeclarators()[0] - .getNestedDeclarator().getName().resolveBinding(); + IVariable g = + (IVariable) decl.getDeclarators()[0].getNestedDeclarator().getName().resolveBinding(); decl = (IASTSimpleDeclaration) tu.getDeclarations()[3]; - IVariable h = (IVariable) decl.getDeclarators()[0] - .getNestedDeclarator().getNestedDeclarator().getName() - .resolveBinding(); + IVariable h = + (IVariable) decl.getDeclarators()[0].getNestedDeclarator().getNestedDeclarator() + .getName().resolveBinding(); IFunctionType t_f = f.getType(); IType t_f_return = t_f.getReturnType(); @@ -3574,7 +3574,7 @@ public class AST2CPPTests extends AST2BaseTest { // B () : A() {} // }; public void testBug89539() throws Exception { - String content= getAboveComment(); + String content= getAboveComment(); IASTTranslationUnit tu = parse(content, ParserLanguage.CPP); CPPNameCollector col = new CPPNameCollector(); tu.accept(col); @@ -4782,7 +4782,7 @@ public class AST2CPPTests extends AST2BaseTest { // auto s2 = s1 += ""; // auto s3 = s2.append("foo"); // } - public void testTypedefPreservation_380498_1() throws Exception { + public void testTypedefPreservation_380498_1() throws Exception { BindingAssertionHelper ba= getAssertionHelper(); ICPPVariable s1 = ba.assertNonProblem("s1", ICPPVariable.class); assertTrue(s1.getType() instanceof ITypedef); @@ -4795,16 +4795,16 @@ public class AST2CPPTests extends AST2BaseTest { assertEquals("string", ((ITypedef) s3.getType()).getName()); } - // template - // struct vector { - // typedef T* const_iterator; - // const_iterator begin() const; - // }; - // + // template + // struct vector { + // typedef T* const_iterator; + // const_iterator begin() const; + // }; + // // void test(const vector& v) { // auto it = v.begin(); // } - public void testTypedefPreservation_380498_2() throws Exception { + public void testTypedefPreservation_380498_2() throws Exception { BindingAssertionHelper ba= getAssertionHelper(); ICPPVariable it = ba.assertNonProblem("it =", "it", ICPPVariable.class); assertTrue(it.getType() instanceof ITypedef); @@ -5086,7 +5086,7 @@ public class AST2CPPTests extends AST2BaseTest { // f1(__null); // } public void testBug240567() throws Exception { - BindingAssertionHelper bh= getAssertionHelper(); + BindingAssertionHelper bh= getAssertionHelper(); bh.assertNonProblem("f1(__null", 2, ICPPFunction.class); } @@ -5284,31 +5284,31 @@ public class AST2CPPTests extends AST2BaseTest { assertEquals(body.getStatements().length, 3); } - public void testBug107150() throws Exception { - StringBuffer buffer = new StringBuffer(); - buffer.append("#define FUNC_PROTOTYPE_PARAMS(list) list\r\n"); //$NON-NLS-1$ - buffer.append("int func1 FUNC_PROTOTYPE_PARAMS((int arg1)){\r\n"); //$NON-NLS-1$ - buffer.append("return 0;\r\n"); //$NON-NLS-1$ - buffer.append("}\r\n"); //$NON-NLS-1$ - buffer.append("int func2 FUNC_PROTOTYPE_PARAMS\r\n"); //$NON-NLS-1$ - buffer.append("((int arg1)){\r\n"); //$NON-NLS-1$ - buffer.append("return 0;\r\n"); //$NON-NLS-1$ - buffer.append("}\r\n"); //$NON-NLS-1$ - IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP); - assertFalse(tu.getDeclarations()[1] instanceof IASTProblemDeclaration); + public void testBug107150() throws Exception { + StringBuffer buffer = new StringBuffer(); + buffer.append("#define FUNC_PROTOTYPE_PARAMS(list) list\r\n"); //$NON-NLS-1$ + buffer.append("int func1 FUNC_PROTOTYPE_PARAMS((int arg1)){\r\n"); //$NON-NLS-1$ + buffer.append("return 0;\r\n"); //$NON-NLS-1$ + buffer.append("}\r\n"); //$NON-NLS-1$ + buffer.append("int func2 FUNC_PROTOTYPE_PARAMS\r\n"); //$NON-NLS-1$ + buffer.append("((int arg1)){\r\n"); //$NON-NLS-1$ + buffer.append("return 0;\r\n"); //$NON-NLS-1$ + buffer.append("}\r\n"); //$NON-NLS-1$ + IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP); + assertFalse(tu.getDeclarations()[1] instanceof IASTProblemDeclaration); - buffer = new StringBuffer(); - buffer.append("#define FUNC_PROTOTYPE_PARAMS(list) list\n"); //$NON-NLS-1$ - buffer.append("int func1 FUNC_PROTOTYPE_PARAMS((int arg1)){\n"); //$NON-NLS-1$ - buffer.append("return 0;\n"); //$NON-NLS-1$ - buffer.append("}\n"); //$NON-NLS-1$ - buffer.append("int func2 FUNC_PROTOTYPE_PARAMS\n"); //$NON-NLS-1$ - buffer.append("((int arg1)){\n"); //$NON-NLS-1$ - buffer.append("return 0;\n"); //$NON-NLS-1$ - buffer.append("}\n"); //$NON-NLS-1$ - tu = parse(buffer.toString(), ParserLanguage.CPP); - assertFalse(tu.getDeclarations()[1] instanceof IASTProblemDeclaration); - } + buffer = new StringBuffer(); + buffer.append("#define FUNC_PROTOTYPE_PARAMS(list) list\n"); //$NON-NLS-1$ + buffer.append("int func1 FUNC_PROTOTYPE_PARAMS((int arg1)){\n"); //$NON-NLS-1$ + buffer.append("return 0;\n"); //$NON-NLS-1$ + buffer.append("}\n"); //$NON-NLS-1$ + buffer.append("int func2 FUNC_PROTOTYPE_PARAMS\n"); //$NON-NLS-1$ + buffer.append("((int arg1)){\n"); //$NON-NLS-1$ + buffer.append("return 0;\n"); //$NON-NLS-1$ + buffer.append("}\n"); //$NON-NLS-1$ + tu = parse(buffer.toString(), ParserLanguage.CPP); + assertFalse(tu.getDeclarations()[1] instanceof IASTProblemDeclaration); + } // class __attribute__((visibility("default"))) FooClass // { @@ -5933,43 +5933,43 @@ public class AST2CPPTests extends AST2BaseTest { checkNewExpression(fdef, 15, IASTIdExpression.class, "int [][]", null); } - // namespace ns { - // void test() {} - // + - // } - public void testTrailingSyntaxErrorInNamespace() throws Exception { - final String comment= getAboveComment(); - IASTTranslationUnit tu= parse(comment, ParserLanguage.CPP, false, false); - ICPPASTNamespaceDefinition ns= getDeclaration(tu, 0); + // namespace ns { + // void test() {} + // + + // } + public void testTrailingSyntaxErrorInNamespace() throws Exception { + final String comment= getAboveComment(); + IASTTranslationUnit tu= parse(comment, ParserLanguage.CPP, false, false); + ICPPASTNamespaceDefinition ns= getDeclaration(tu, 0); IASTDeclaration decl= getDeclaration(ns, 0); IASTProblemDeclaration pdecl= getDeclaration(ns, 1); assertEquals("+", pdecl.getRawSignature()); - } + } - // extern "C" { - // void test() {} - // + - // } - public void testTrailingSyntaxErrorInLinkageSpec() throws Exception { - final String comment= getAboveComment(); - IASTTranslationUnit tu= parse(comment, ParserLanguage.CPP, false, false); - ICPPASTLinkageSpecification ls= getDeclaration(tu, 0); + // extern "C" { + // void test() {} + // + + // } + public void testTrailingSyntaxErrorInLinkageSpec() throws Exception { + final String comment= getAboveComment(); + IASTTranslationUnit tu= parse(comment, ParserLanguage.CPP, false, false); + ICPPASTLinkageSpecification ls= getDeclaration(tu, 0); IASTDeclaration decl= getDeclaration(ls, 0); IASTProblemDeclaration pdecl= getDeclaration(ls, 1); assertEquals("+", pdecl.getRawSignature()); - } + } - // class C; - // void func(void (C::*m)(int) const); - public void test233889_a() throws Exception { - BindingAssertionHelper bh= getAssertionHelper(); + // class C; + // void func(void (C::*m)(int) const); + public void test233889_a() throws Exception { + BindingAssertionHelper bh= getAssertionHelper(); ICPPFunction func= bh.assertNonProblem("func(", 4, ICPPFunction.class); assertEquals(1,func.getParameters().length); IType type= func.getParameters()[0].getType(); ICPPPointerToMemberType ptm= assertInstance(type, ICPPPointerToMemberType.class); ICPPFunctionType t= ((ICPPFunctionType)ptm.getType()); assertTrue(t.isConst()); - } + } // struct C { // int m1(int a); @@ -5983,14 +5983,14 @@ public class AST2CPPTests extends AST2BaseTest { // func(&C::m1); // func(&C::m2); // } - public void testBug233889_b() throws Exception { + public void testBug233889_b() throws Exception { BindingAssertionHelper bh= getAssertionHelper(); ICPPFunction fn1= bh.assertNonProblem("func(&C::m1", 4, ICPPFunction.class); ICPPFunction fn2= bh.assertNonProblem("func(&C::m2", 4, ICPPFunction.class); assertNotSame(fn1, fn2); - } + } - // class A; + // class A; // // void foo(A* a) {} // void foo(const A* a) {} @@ -6328,29 +6328,29 @@ public class AST2CPPTests extends AST2BaseTest { assertSame(ors[0], m1); } - // struct A { - // int a; - // }; - // - // void test(A* p) { - // p.a; // should not resolve - // } - public void testPointerMemberAccess_245068() throws Exception { - final String comment= getAboveComment(); - final boolean[] isCpps= {false, true}; - for (boolean isCpp : isCpps) { - BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp); - ba.assertProblem("a; // should not resolve", 1); - } - } + // struct A { + // int a; + // }; + // + // void test(A* p) { + // p.a; // should not resolve + // } + public void testPointerMemberAccess_245068() throws Exception { + final String comment= getAboveComment(); + final boolean[] isCpps= {false, true}; + for (boolean isCpp : isCpps) { + BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp); + ba.assertProblem("a; // should not resolve", 1); + } + } - // namespace ns { - // template class CT {}; - // } - // using ns::CT; - public void testTemplateIdInUsingDecl_251199() throws Exception { - parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP); - } + // namespace ns { + // template class CT {}; + // } + // using ns::CT; + public void testTemplateIdInUsingDecl_251199() throws Exception { + parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP); + } // namespace ns { // struct A {}; @@ -6363,7 +6363,7 @@ public class AST2CPPTests extends AST2BaseTest { final String code = getAboveComment(); BindingAssertionHelper bh= new BindingAssertionHelper(code, true); bh.assertNonProblem("operator ns::A", 14); - parseAndCheckBindings(code, ParserLanguage.CPP); + parseAndCheckBindings(code, ParserLanguage.CPP); } // void f(); @@ -6371,24 +6371,24 @@ public class AST2CPPTests extends AST2BaseTest { // void test(int p) { // f(p); // } - public void testFunctionExtraArgument() throws Exception { + public void testFunctionExtraArgument() throws Exception { BindingAssertionHelper ba= getAssertionHelper(); ba.assertProblem("f(p)", 1); - } + } - // void f(...); + // void f(...); // // void test(int* p) { // f(p); // } - public void testVariadicFunction_2500582() throws Exception { - final String comment= getAboveComment(); - final boolean[] isCpps= {false, true}; - for (boolean isCpp : isCpps) { - BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp); - ba.assertNonProblem("f(p)", 1, IFunction.class); - } - } + public void testVariadicFunction_2500582() throws Exception { + final String comment= getAboveComment(); + final boolean[] isCpps= {false, true}; + for (boolean isCpp : isCpps) { + BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp); + ba.assertNonProblem("f(p)", 1, IFunction.class); + } + } // struct Incomplete; // @@ -6399,29 +6399,29 @@ public class AST2CPPTests extends AST2BaseTest { // // Should resolve to f(Incomplete*) since 0 can be converted to Incomplete* // f(0); // } - public void testVariadicFunction_2500583() throws Exception { - final String comment= getAboveComment(); - final boolean[] isCpps= {false, true}; - for (boolean isCpp : isCpps) { - BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp); - IFunction decl= ba.assertNonProblem("f(Incomplete* p)", 1, IFunction.class); - IFunction func= ba.assertNonProblem("f(0)", 1, IFunction.class); - assertSame(decl, func); - } - } + public void testVariadicFunction_2500583() throws Exception { + final String comment= getAboveComment(); + final boolean[] isCpps= {false, true}; + for (boolean isCpp : isCpps) { + BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp); + IFunction decl= ba.assertNonProblem("f(Incomplete* p)", 1, IFunction.class); + IFunction func= ba.assertNonProblem("f(0)", 1, IFunction.class); + assertSame(decl, func); + } + } - // class MyClass{ - // public: - // int v; - // int& operator () (int i){ return v; } - // int& operator () (int i, int j){ return v; } - // }; - // - // int main(MyClass c, int i){ - // c(i,i)= 0; - // c(i) = 0; - // } - public void testFunctionCallOnLHS_252695() throws Exception { + // class MyClass{ + // public: + // int v; + // int& operator () (int i){ return v; } + // int& operator () (int i, int j){ return v; } + // }; + // + // int main(MyClass c, int i){ + // c(i,i)= 0; + // c(i) = 0; + // } + public void testFunctionCallOnLHS_252695() throws Exception { final String code = getAboveComment(); IASTTranslationUnit tu= parseAndCheckBindings(code, ParserLanguage.CPP, true); IASTFunctionDefinition fdef= getDeclaration(tu, 1); @@ -6429,15 +6429,15 @@ public class AST2CPPTests extends AST2BaseTest { assertInstance(exstmt.getExpression(), IASTBinaryExpression.class); exstmt= getStatement(fdef, 1); assertInstance(exstmt.getExpression(), IASTBinaryExpression.class); - } + } - // template class A; - // class A {}; - // class A; - // class B; - // template class B; - // template class B {}; - public void testInvalidClassRedeclaration_254961() throws Exception { + // template class A; + // class A {}; + // class A; + // class B; + // template class B; + // template class B {}; + public void testInvalidClassRedeclaration_254961() throws Exception { final String code = getAboveComment(); IASTTranslationUnit tu= parse(code, ParserLanguage.CPP, true, false); CPPNameCollector nc= new CPPNameCollector(); @@ -6447,15 +6447,15 @@ public class AST2CPPTests extends AST2BaseTest { assertProblemBinding(IProblemBinding.SEMANTIC_INVALID_REDECLARATION, nc.getName(3).resolveBinding()); assertProblemBinding(IProblemBinding.SEMANTIC_INVALID_REDECLARATION, nc.getName(6).resolveBinding()); assertProblemBinding(IProblemBinding.SEMANTIC_INVALID_REDEFINITION, nc.getName(8).resolveBinding()); - } + } - // template class A; - // template class T> class A {}; - // template class T> class A; - // template class T> class B {}; - // template class B; - // template class B {}; - public void testInvalidClassRedeclaration_364226() throws Exception { + // template class A; + // template class T> class A {}; + // template class T> class A; + // template class T> class B {}; + // template class B; + // template class B {}; + public void testInvalidClassRedeclaration_364226() throws Exception { final String code = getAboveComment(); IASTTranslationUnit tu= parse(code, ParserLanguage.CPP, true, false); CPPNameCollector nc= new CPPNameCollector(); @@ -6465,56 +6465,56 @@ public class AST2CPPTests extends AST2BaseTest { assertProblemBinding(IProblemBinding.SEMANTIC_INVALID_REDECLARATION, nc.getName(7).resolveBinding()); assertProblemBinding(IProblemBinding.SEMANTIC_INVALID_REDECLARATION, nc.getName(12).resolveBinding()); assertProblemBinding(IProblemBinding.SEMANTIC_INVALID_REDEFINITION, nc.getName(14).resolveBinding()); - } + } - // struct Foo { - // void foo(); - // }; - // void Foo::foo(void) { - // } - public void testVoidParamInDefinition_257376() throws Exception { - parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP); - } + // struct Foo { + // void foo(); + // }; + // void Foo::foo(void) { + // } + public void testVoidParamInDefinition_257376() throws Exception { + parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP); + } - // namespace ns { - // struct C { - // C(C* c){} - // }; - // int a; - // } - // struct C { - // C(ns::C*){} - // }; - // void testbla() { - // ns::C* cptr= 0; - // C c= C(cptr); - // } - public void testNoKoenigForConstructors() throws Exception { - parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP); - } + // namespace ns { + // struct C { + // C(C* c){} + // }; + // int a; + // } + // struct C { + // C(ns::C*){} + // }; + // void testbla() { + // ns::C* cptr= 0; + // C c= C(cptr); + // } + public void testNoKoenigForConstructors() throws Exception { + parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP); + } - // typedef void VOID; - // void donothing(); - // void donothing(VOID){} - // void donothing(VOID); - // void test() { - // donothing(); - // } - public void testVoidViaTypedef_Bug258694() throws Exception { - parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP); - } + // typedef void VOID; + // void donothing(); + // void donothing(VOID){} + // void donothing(VOID); + // void test() { + // donothing(); + // } + public void testVoidViaTypedef_Bug258694() throws Exception { + parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP); + } // struct A { // B method(B p, int& a = y) { // B is not defined // B b; - // int x = y + 1; - // return b; + // int x = y + 1; + // return b; // } // struct B {}; - // static int& x = y; // y is not defined - // int y; + // static int& x = y; // y is not defined + // int y; // }; - public void testScopeOfClassMember_259460() throws Exception { + public void testScopeOfClassMember_259460() throws Exception { BindingAssertionHelper ba= getAssertionHelper(); ba.assertNonProblem("B b", 1, ICPPClassType.class); ba.assertProblem("B p", 1); @@ -6522,23 +6522,23 @@ public class AST2CPPTests extends AST2BaseTest { ba.assertNonProblem("y + 1;", 1, ICPPField.class); ba.assertNonProblem("y) {", 1, ICPPField.class); ba.assertProblem("y; // y is not defined", 1); - } + } // class A { // int method(int a = GREEN) { // return RED; // } - // static int x = GREEN; // GREEN is not defined + // static int x = GREEN; // GREEN is not defined // enum Color { // RED, GREEN // }; // }; - public void testScopeOfClassMember_259648() throws Exception { + public void testScopeOfClassMember_259648() throws Exception { BindingAssertionHelper ba= getAssertionHelper(); ba.assertNonProblem("GREEN)", 5, IEnumerator.class); ba.assertNonProblem("RED;", 3, IEnumerator.class); ba.assertProblem("GREEN;", 5); - } + } // struct A { // int& operator*(); @@ -6573,66 +6573,66 @@ public class AST2CPPTests extends AST2BaseTest { parseAndCheckBindings(code); } - // struct A { - // int a; - // }; - // - // struct B { - // A operator-(B b); - // A operator+(B& b); - // A operator*(const B& b); - // A operator/(B b) const; - // A operator%(const B& b) const; - // }; - // - // void test(B p1, B p2) { - // (p1 - p2).a; //1 - // (p1 + p2).a; //2 - // (p1 * p2).a; //3 - // (p1 / p2).a; //4 - // (p1 % p2).a; //5 - // } - public void testOverloadedBinaryOperator_259927_1() throws Exception { - BindingAssertionHelper ba= getAssertionHelper(); - ba.assertNonProblem("a; //1", 1, ICPPField.class); - ba.assertNonProblem("a; //2", 1, ICPPField.class); - ba.assertNonProblem("a; //3", 1, ICPPField.class); - ba.assertNonProblem("a; //4", 1, ICPPField.class); - ba.assertNonProblem("a; //5", 1, ICPPField.class); - } + // struct A { + // int a; + // }; + // + // struct B { + // A operator-(B b); + // A operator+(B& b); + // A operator*(const B& b); + // A operator/(B b) const; + // A operator%(const B& b) const; + // }; + // + // void test(B p1, B p2) { + // (p1 - p2).a; //1 + // (p1 + p2).a; //2 + // (p1 * p2).a; //3 + // (p1 / p2).a; //4 + // (p1 % p2).a; //5 + // } + public void testOverloadedBinaryOperator_259927_1() throws Exception { + BindingAssertionHelper ba= getAssertionHelper(); + ba.assertNonProblem("a; //1", 1, ICPPField.class); + ba.assertNonProblem("a; //2", 1, ICPPField.class); + ba.assertNonProblem("a; //3", 1, ICPPField.class); + ba.assertNonProblem("a; //4", 1, ICPPField.class); + ba.assertNonProblem("a; //5", 1, ICPPField.class); + } - // struct A { - // int a; - // }; - // struct B {}; - // enum E { zero }; - // - // A operator-(B p1, int p2); - // A operator+(int p1, const B& p2); - // A operator*(E p1, int p2); - // A operator/(int p1, const E& p2); - // A operator%(const B& p1, const B& p2); - // - // void test(B b, E e, int i) { - // (b - i).a; //1 - // (i + b).a; //2 - // (e * i).a; //3 - // (i / e).a; //4 - // (b % b).a; //5 - // (b + i).a; //6 - // } - public void testOverloadedBinaryOperator_259927_2() throws Exception { - BindingAssertionHelper ba= getAssertionHelper(); - ba.assertNonProblem("a; //1", 1, ICPPField.class); - ba.assertNonProblem("a; //2", 1, ICPPField.class); - ba.assertNonProblem("a; //3", 1, ICPPField.class); - ba.assertNonProblem("a; //4", 1, ICPPField.class); - ba.assertNonProblem("a; //5", 1, ICPPField.class); - ba.assertProblem("a; //6", 1); - } + // struct A { + // int a; + // }; + // struct B {}; + // enum E { zero }; + // + // A operator-(B p1, int p2); + // A operator+(int p1, const B& p2); + // A operator*(E p1, int p2); + // A operator/(int p1, const E& p2); + // A operator%(const B& p1, const B& p2); + // + // void test(B b, E e, int i) { + // (b - i).a; //1 + // (i + b).a; //2 + // (e * i).a; //3 + // (i / e).a; //4 + // (b % b).a; //5 + // (b + i).a; //6 + // } + public void testOverloadedBinaryOperator_259927_2() throws Exception { + BindingAssertionHelper ba= getAssertionHelper(); + ba.assertNonProblem("a; //1", 1, ICPPField.class); + ba.assertNonProblem("a; //2", 1, ICPPField.class); + ba.assertNonProblem("a; //3", 1, ICPPField.class); + ba.assertNonProblem("a; //4", 1, ICPPField.class); + ba.assertNonProblem("a; //5", 1, ICPPField.class); + ba.assertProblem("a; //6", 1); + } - // struct A { + // struct A { // int x; // }; // @@ -6645,29 +6645,29 @@ public class AST2CPPTests extends AST2BaseTest { // (p1++).x; //1 // (++p1).x; //2 // } - public void testOverloadedUnaryOperator_259927_3() throws Exception { - BindingAssertionHelper ba= getAssertionHelper(); - ba.assertNonProblem("x; //1", 1, ICPPField.class); - ba.assertNonProblem("x; //2", 1, ICPPField.class); - } + public void testOverloadedUnaryOperator_259927_3() throws Exception { + BindingAssertionHelper ba= getAssertionHelper(); + ba.assertNonProblem("x; //1", 1, ICPPField.class); + ba.assertNonProblem("x; //2", 1, ICPPField.class); + } // struct A { // int x; // }; // struct B { }; - // A& operator++(B); // prefix + // A& operator++(B); // prefix // A operator++(B, int); // postfix // // void test(B p1, B p2) { // (p1++).x; //1 // (++p1).x; //2 // } - public void testOverloadedUnaryOperator_259927_4() throws Exception { - BindingAssertionHelper ba= getAssertionHelper(); - ba.assertNonProblem("x; //1", 1, ICPPField.class); - ba.assertNonProblem("x; //2", 1, ICPPField.class); - } + public void testOverloadedUnaryOperator_259927_4() throws Exception { + BindingAssertionHelper ba= getAssertionHelper(); + ba.assertNonProblem("x; //1", 1, ICPPField.class); + ba.assertNonProblem("x; //2", 1, ICPPField.class); + } // struct A { @@ -6694,11 +6694,11 @@ public class AST2CPPTests extends AST2BaseTest { // (!b).xx; // 5 // (~b).xx; // 6 // } - public void testOverloadedUnaryOperator_259927_5() throws Exception { - BindingAssertionHelper ba= getAssertionHelper(); - for(int i = 1; i <=6; i++) - ba.assertNonProblem("xx; // "+i, 2, ICPPField.class); - } + public void testOverloadedUnaryOperator_259927_5() throws Exception { + BindingAssertionHelper ba= getAssertionHelper(); + for(int i = 1; i <=6; i++) + ba.assertNonProblem("xx; // "+i, 2, ICPPField.class); + } // struct A { // int xx; @@ -6725,56 +6725,56 @@ public class AST2CPPTests extends AST2BaseTest { // (!b).xx; // 5 // (~b).xx; // 6 //} - public void testOverloadedUnaryOperator_259927_6() throws Exception { - BindingAssertionHelper ba= getAssertionHelper(); - for(int i = 1; i <=6; i++) - ba.assertNonProblem("xx; // "+i, 2, ICPPField.class); - } + public void testOverloadedUnaryOperator_259927_6() throws Exception { + BindingAssertionHelper ba= getAssertionHelper(); + for(int i = 1; i <=6; i++) + ba.assertNonProblem("xx; // "+i, 2, ICPPField.class); + } - // int a,b,c,d ; - // class X { - // void m() { - // T* a; - // I* b; - // S1* c; - // S2* d; - // } - // typedef int T; - // int I; - // typedef int S1 (int(T)); // resolve this ambiguity first - // typedef int S2 (int(t)); // resolve this ambiguity first - // }; - public void testOrderOfAmbiguityResolution_259373() throws Exception { - BindingAssertionHelper ba= getAssertionHelper(); - ICPPVariable a= ba.assertNonProblem("a;", 1); - assertInstance(a.getType(), IPointerType.class); - ICPPVariable b= ba.assertNonProblem("b;", 1); - assertInstance(b.getType(), IBasicType.class); - ICPPVariable c= ba.assertNonProblem("c;", 1); - assertInstance(c.getType(), IPointerType.class); - ITypedef s1= (ITypedef) ((IPointerType) c.getType()).getType(); - assertInstance(((IFunctionType) s1.getType()).getParameterTypes()[0], IPointerType.class); - ICPPVariable d= ba.assertNonProblem("d;", 1); - assertInstance(d.getType(), IPointerType.class); - ITypedef s2= (ITypedef) ((IPointerType) d.getType()).getType(); - assertInstance(((IFunctionType) s2.getType()).getParameterTypes()[0], IBasicType.class); - } + // int a,b,c,d ; + // class X { + // void m() { + // T* a; + // I* b; + // S1* c; + // S2* d; + // } + // typedef int T; + // int I; + // typedef int S1 (int(T)); // resolve this ambiguity first + // typedef int S2 (int(t)); // resolve this ambiguity first + // }; + public void testOrderOfAmbiguityResolution_259373() throws Exception { + BindingAssertionHelper ba= getAssertionHelper(); + ICPPVariable a= ba.assertNonProblem("a;", 1); + assertInstance(a.getType(), IPointerType.class); + ICPPVariable b= ba.assertNonProblem("b;", 1); + assertInstance(b.getType(), IBasicType.class); + ICPPVariable c= ba.assertNonProblem("c;", 1); + assertInstance(c.getType(), IPointerType.class); + ITypedef s1= (ITypedef) ((IPointerType) c.getType()).getType(); + assertInstance(((IFunctionType) s1.getType()).getParameterTypes()[0], IPointerType.class); + ICPPVariable d= ba.assertNonProblem("d;", 1); + assertInstance(d.getType(), IPointerType.class); + ITypedef s2= (ITypedef) ((IPointerType) d.getType()).getType(); + assertInstance(((IFunctionType) s2.getType()).getParameterTypes()[0], IBasicType.class); + } - // namespace A { - // class X { - // friend void f(int); - // class Y { - // friend void g(int); - // }; - // }; - // void test() { - // f(1); - // g(1); - // } - // } - public void testFriendFunctionResolution_86368_1() throws Exception { + // namespace A { + // class X { + // friend void f(int); + // class Y { + // friend void g(int); + // }; + // }; + // void test() { + // f(1); + // g(1); + // } + // } + public void testFriendFunctionResolution_86368_1() throws Exception { final String code= getAboveComment(); parseAndCheckBindings(code); @@ -6793,23 +6793,23 @@ public class AST2CPPTests extends AST2BaseTest { g2= bh.assertNonProblem("g(1)", 1); g1= bh.assertNonProblem("g(int)", 1); assertSame(g1, g2); - } + } - // namespace A { - // void f(int); - // } - // using A::f; - // namespace A { - // void f(char); // openReferences fails - // } - // void foo() { - // f('i'); - // } - // void bar() { - // using A::f; - // f('c'); - // } - public void testFriendFunctionResolution_86368_2() throws Exception { + // namespace A { + // void f(int); + // } + // using A::f; + // namespace A { + // void f(char); // openReferences fails + // } + // void foo() { + // f('i'); + // } + // void bar() { + // using A::f; + // f('c'); + // } + public void testFriendFunctionResolution_86368_2() throws Exception { final String code= getAboveComment(); parseAndCheckBindings(code); @@ -6828,96 +6828,96 @@ public class AST2CPPTests extends AST2BaseTest { g2= bh.assertNonProblem("f('c')", 1); g1= bh.assertNonProblem("f(char)", 1); assertSame(g1, g2); - } + } - // class A { - // public: - // void foo() const volatile; - // void foo() volatile; - // void foo() const; - // void foo(); - // void bar() const volatile; - // void bar() volatile; - // void bar() const; - // void bar(); - // }; - // void A::foo() const volatile { bar();/*1*/ } - // void A::foo() volatile { bar();/*2*/ } - // void A::foo() const { bar();/*3*/ } - // void A::foo() { bar();/*4*/ } - // void test() { - // A a; - // const A ca; - // volatile A va; - // const volatile A cva; - // cva.bar();/*5*/ - // va.bar();/*6*/ - // ca.bar();/*7*/ - // a.bar();/*8*/ - // } - public void testMemberFunctionDisambiguationByCVness_238409() throws Exception { + // class A { + // public: + // void foo() const volatile; + // void foo() volatile; + // void foo() const; + // void foo(); + // void bar() const volatile; + // void bar() volatile; + // void bar() const; + // void bar(); + // }; + // void A::foo() const volatile { bar();/*1*/ } + // void A::foo() volatile { bar();/*2*/ } + // void A::foo() const { bar();/*3*/ } + // void A::foo() { bar();/*4*/ } + // void test() { + // A a; + // const A ca; + // volatile A va; + // const volatile A cva; + // cva.bar();/*5*/ + // va.bar();/*6*/ + // ca.bar();/*7*/ + // a.bar();/*8*/ + // } + public void testMemberFunctionDisambiguationByCVness_238409() throws Exception { final String code= getAboveComment(); BindingAssertionHelper bh= new BindingAssertionHelper(code, true); - ICPPMethod bar_cv= bh.assertNonProblem("bar();/*1*/", 3, ICPPMethod.class); - ICPPMethod bar_v= bh.assertNonProblem("bar();/*2*/", 3, ICPPMethod.class); - ICPPMethod bar_c= bh.assertNonProblem("bar();/*3*/", 3, ICPPMethod.class); - ICPPMethod bar= bh.assertNonProblem("bar();/*4*/", 3, ICPPMethod.class); - ICPPFunctionType bar_cv_ft= bar_cv.getType(); - ICPPFunctionType bar_v_ft= bar_v.getType(); - ICPPFunctionType bar_c_ft= bar_c.getType(); - ICPPFunctionType bar_ft= bar.getType(); + ICPPMethod bar_cv= bh.assertNonProblem("bar();/*1*/", 3, ICPPMethod.class); + ICPPMethod bar_v= bh.assertNonProblem("bar();/*2*/", 3, ICPPMethod.class); + ICPPMethod bar_c= bh.assertNonProblem("bar();/*3*/", 3, ICPPMethod.class); + ICPPMethod bar= bh.assertNonProblem("bar();/*4*/", 3, ICPPMethod.class); + ICPPFunctionType bar_cv_ft= bar_cv.getType(); + ICPPFunctionType bar_v_ft= bar_v.getType(); + ICPPFunctionType bar_c_ft= bar_c.getType(); + ICPPFunctionType bar_ft= bar.getType(); - assertTrue(bar_cv_ft.isConst()); assertTrue(bar_cv_ft.isVolatile()); - assertTrue(!bar_v_ft.isConst()); assertTrue(bar_v_ft.isVolatile()); - assertTrue(bar_c_ft.isConst()); assertTrue(!bar_c_ft.isVolatile()); - assertTrue(!bar_ft.isConst()); assertTrue(!bar_ft.isVolatile()); + assertTrue(bar_cv_ft.isConst()); assertTrue(bar_cv_ft.isVolatile()); + assertTrue(!bar_v_ft.isConst()); assertTrue(bar_v_ft.isVolatile()); + assertTrue(bar_c_ft.isConst()); assertTrue(!bar_c_ft.isVolatile()); + assertTrue(!bar_ft.isConst()); assertTrue(!bar_ft.isVolatile()); - bar_cv= bh.assertNonProblem("bar();/*5*/", 3, ICPPMethod.class); - bar_v= bh.assertNonProblem("bar();/*6*/", 3, ICPPMethod.class); - bar_c= bh.assertNonProblem("bar();/*7*/", 3, ICPPMethod.class); - bar= bh.assertNonProblem("bar();/*8*/", 3, ICPPMethod.class); - bar_cv_ft= bar_cv.getType(); - bar_v_ft= bar_v.getType(); - bar_c_ft= bar_c.getType(); - bar_ft= bar.getType(); + bar_cv= bh.assertNonProblem("bar();/*5*/", 3, ICPPMethod.class); + bar_v= bh.assertNonProblem("bar();/*6*/", 3, ICPPMethod.class); + bar_c= bh.assertNonProblem("bar();/*7*/", 3, ICPPMethod.class); + bar= bh.assertNonProblem("bar();/*8*/", 3, ICPPMethod.class); + bar_cv_ft= bar_cv.getType(); + bar_v_ft= bar_v.getType(); + bar_c_ft= bar_c.getType(); + bar_ft= bar.getType(); - assertTrue(bar_cv_ft.isConst()); assertTrue(bar_cv_ft.isVolatile()); - assertTrue(!bar_v_ft.isConst()); assertTrue(bar_v_ft.isVolatile()); - assertTrue(bar_c_ft.isConst()); assertTrue(!bar_c_ft.isVolatile()); - assertTrue(!bar_ft.isConst()); assertTrue(!bar_ft.isVolatile()); - } + assertTrue(bar_cv_ft.isConst()); assertTrue(bar_cv_ft.isVolatile()); + assertTrue(!bar_v_ft.isConst()); assertTrue(bar_v_ft.isVolatile()); + assertTrue(bar_c_ft.isConst()); assertTrue(!bar_c_ft.isVolatile()); + assertTrue(!bar_ft.isConst()); assertTrue(!bar_ft.isVolatile()); + } - // void test1(float f); - // void test1(void); - // void blabla() { - // test1(1); - // } - // enum E {e1}; - // class C {}; - // void test2(float f); - // void test2(C c); - // void blabla2() { - // test2(e1); - // } - public void testOverloadResolution_262191() throws Exception { + // void test1(float f); + // void test1(void); + // void blabla() { + // test1(1); + // } + // enum E {e1}; + // class C {}; + // void test2(float f); + // void test2(C c); + // void blabla2() { + // test2(e1); + // } + public void testOverloadResolution_262191() throws Exception { final String code= getAboveComment(); parseAndCheckBindings(code); - } + } - // enum E {e1}; - // typedef int TInt; - // void select(int); - // void test() { - // int a= TInt(1); - // E e= E(0); - // void* h; - // select (int (h) + 1); - // } - public void testSimpleTypeConstructorExpressions() throws Exception { + // enum E {e1}; + // typedef int TInt; + // void select(int); + // void test() { + // int a= TInt(1); + // E e= E(0); + // void* h; + // select (int (h) + 1); + // } + public void testSimpleTypeConstructorExpressions() throws Exception { final String code= getAboveComment(); - parseAndCheckBindings(code); - } + parseAndCheckBindings(code); + } // struct A {}; // A a(); @@ -6972,7 +6972,7 @@ public class AST2CPPTests extends AST2BaseTest { // for (;A* a = 0;) {a= 0;} // for (;B* b;) {b= 0;} // } - public void testAmbiguityResolutionInCondition_263158() throws Exception { + public void testAmbiguityResolutionInCondition_263158() throws Exception { final String code = getAboveComment(); BindingAssertionHelper ba= new BindingAssertionHelper(code, true); ba.assertNonProblem("A*", 1, ICPPClassType.class); @@ -6980,7 +6980,7 @@ public class AST2CPPTests extends AST2BaseTest { ba.assertNonProblem("B*", 1, ICPPVariable.class); parseAndCheckBindings(code, ParserLanguage.CPP); - } + } // void f(int x); // @@ -7254,9 +7254,9 @@ public class AST2CPPTests extends AST2BaseTest { // } public void testOverloadResolutionForOperators_Bug266211() throws Exception { BindingAssertionHelper ba= getAssertionHelper(); - ba.assertNonProblem("a; //1", 1, ICPPField.class); - ba.assertNonProblem("a; //2", 1, ICPPField.class); - ba.assertNonProblem("b; //3", 1, ICPPField.class); + ba.assertNonProblem("a; //1", 1, ICPPField.class); + ba.assertNonProblem("a; //2", 1, ICPPField.class); + ba.assertNonProblem("b; //3", 1, ICPPField.class); } @@ -7275,8 +7275,8 @@ public class AST2CPPTests extends AST2BaseTest { // } public void testOverloadResolutionForOperators_Bug268534() throws Exception { BindingAssertionHelper ba= getAssertionHelper(); - ba.assertNonProblem("a; //1", 1, ICPPField.class); - ba.assertNonProblem("a; //2", 1, ICPPField.class); + ba.assertNonProblem("a; //1", 1, ICPPField.class); + ba.assertNonProblem("a; //2", 1, ICPPField.class); } // class C { @@ -7289,7 +7289,7 @@ public class AST2CPPTests extends AST2BaseTest { // } public void testInvalidUserDefinedConversion_Bug269729() throws Exception { BindingAssertionHelper ba= getAssertionHelper(); - ba.assertProblem("test(c)", 4); + ba.assertProblem("test(c)", 4); } @@ -7323,16 +7323,16 @@ public class AST2CPPTests extends AST2BaseTest { // A a; public void testForwardDeclarationAfterUsing_271236() throws Exception { BindingAssertionHelper ba= getAssertionHelper(); - ba.assertNonProblem("A a;", 1, ICPPClassType.class); + ba.assertNonProblem("A a;", 1, ICPPClassType.class); } // template class Moo; // bool getFile(Moo & res); public void testScopeOfClassFwdDecl_270831() throws Exception { BindingAssertionHelper ba= getAssertionHelper(); - ICPPClassType t= ba.assertNonProblem("Foo", 3, ICPPClassType.class); - IScope scope= t.getScope(); - assertEquals(EScopeKind.eGlobal, scope.getKind()); + ICPPClassType t= ba.assertNonProblem("Foo", 3, ICPPClassType.class); + IScope scope= t.getScope(); + assertEquals(EScopeKind.eGlobal, scope.getKind()); } // class C {}; @@ -7354,13 +7354,13 @@ public class AST2CPPTests extends AST2BaseTest { BindingAssertionHelper ba= new BindingAssertionHelper(code, true); ICPPFunction t= ba.assertNonProblem("test(d1);", 4, ICPPFunction.class); ICPPClassType ct= (ICPPClassType) t.getParameters()[0].getType(); - assertEquals("C", ct.getName()); + assertEquals("C", ct.getName()); t= ba.assertNonProblem("test(d2);", 4, ICPPFunction.class); ct= (ICPPClassType) t.getParameters()[0].getType(); - assertEquals("C", ct.getName()); + assertEquals("C", ct.getName()); - parseAndCheckBindings(code, ParserLanguage.CPP); + parseAndCheckBindings(code, ParserLanguage.CPP); } // int foo(int x); @@ -7382,7 +7382,7 @@ public class AST2CPPTests extends AST2BaseTest { // class C { // C(T); // ctor // C(s); // instance s; - // }; + // }; public void testDeclarationAmbiguity_Bug269953() throws Exception { final String code = getAboveComment(); IASTTranslationUnit tu= parseAndCheckBindings(code, ParserLanguage.CPP); @@ -7498,21 +7498,21 @@ public class AST2CPPTests extends AST2BaseTest { // } public void testEnumToIntConversion_285368() throws Exception { BindingAssertionHelper ba= getAssertionHelper(); - ICPPFunction f1 = ba.assertNonProblem("f(i1)", 1, ICPPFunction.class); - IType t1 = f1.getType().getParameterTypes()[0]; - assertTrue(t1 instanceof ICPPBasicType); - assertEquals(IBasicType.t_int, ((ICPPBasicType) t1).getType()); - assertEquals(0, ((ICPPBasicType) t1).getQualifierBits()); - ICPPFunction f2 = ba.assertNonProblem("f(u1)", 1, ICPPFunction.class); - IType t2 = f2.getType().getParameterTypes()[0]; - assertTrue(t2 instanceof ICPPBasicType); - assertEquals(IBasicType.t_int, ((ICPPBasicType) t2).getType()); - assertEquals(IBasicType.IS_UNSIGNED, ((ICPPBasicType) t2).getQualifierBits()); - ICPPFunction f3 = ba.assertNonProblem("f(l1)", 1, ICPPFunction.class); - IType t3 = f3.getType().getParameterTypes()[0]; - assertTrue(t3 instanceof ICPPBasicType); - assertEquals(IBasicType.t_int, ((ICPPBasicType) t3).getType()); - assertEquals(IBasicType.IS_LONG, ((ICPPBasicType) t3).getQualifierBits()); + ICPPFunction f1 = ba.assertNonProblem("f(i1)", 1, ICPPFunction.class); + IType t1 = f1.getType().getParameterTypes()[0]; + assertTrue(t1 instanceof ICPPBasicType); + assertEquals(IBasicType.t_int, ((ICPPBasicType) t1).getType()); + assertEquals(0, ((ICPPBasicType) t1).getQualifierBits()); + ICPPFunction f2 = ba.assertNonProblem("f(u1)", 1, ICPPFunction.class); + IType t2 = f2.getType().getParameterTypes()[0]; + assertTrue(t2 instanceof ICPPBasicType); + assertEquals(IBasicType.t_int, ((ICPPBasicType) t2).getType()); + assertEquals(IBasicType.IS_UNSIGNED, ((ICPPBasicType) t2).getQualifierBits()); + ICPPFunction f3 = ba.assertNonProblem("f(l1)", 1, ICPPFunction.class); + IType t3 = f3.getType().getParameterTypes()[0]; + assertTrue(t3 instanceof ICPPBasicType); + assertEquals(IBasicType.t_int, ((ICPPBasicType) t3).getType()); + assertEquals(IBasicType.IS_LONG, ((ICPPBasicType) t3).getQualifierBits()); } // typedef enum enum_name enum_name; @@ -7788,26 +7788,26 @@ public class AST2CPPTests extends AST2BaseTest { // template F methodTemplate; // }; public void testFunctionDeclViaTypedef_86495() throws Exception { - final String code = getAboveComment(); - parseAndCheckBindings(code, ParserLanguage.CPP); - BindingAssertionHelper bh= new BindingAssertionHelper(code, true); + final String code = getAboveComment(); + parseAndCheckBindings(code, ParserLanguage.CPP); + BindingAssertionHelper bh= new BindingAssertionHelper(code, true); - ICPPFunctionTemplate template= bh.assertNonProblem("functionTemplate", 16); - assertNotNull(template.getType()); - assertEquals(1, template.getParameters().length); + ICPPFunctionTemplate template= bh.assertNonProblem("functionTemplate", 16); + assertNotNull(template.getType()); + assertEquals(1, template.getParameters().length); - ICPPMethod method= bh.assertNonProblem("method", 6); - assertNotNull(method.getType()); - assertEquals(1, method.getParameters().length); + ICPPMethod method= bh.assertNonProblem("method", 6); + assertNotNull(method.getType()); + assertEquals(1, method.getParameters().length); - ICPPFunction friendFunction= bh.assertNonProblem("friendFunction", 14); - assertNotNull(friendFunction.getType()); - assertEquals(1, friendFunction.getParameters().length); + ICPPFunction friendFunction= bh.assertNonProblem("friendFunction", 14); + assertNotNull(friendFunction.getType()); + assertEquals(1, friendFunction.getParameters().length); - ICPPMethod methodTemplate= bh.assertNonProblem("methodTemplate", 14); - assertTrue(methodTemplate instanceof ICPPFunctionTemplate); - assertNotNull(methodTemplate.getType()); - assertEquals(1, methodTemplate.getParameters().length); + ICPPMethod methodTemplate= bh.assertNonProblem("methodTemplate", 14); + assertTrue(methodTemplate instanceof ICPPFunctionTemplate); + assertNotNull(methodTemplate.getType()); + assertEquals(1, methodTemplate.getParameters().length); } // void x(const char (&)[1]) {}; @@ -7824,8 +7824,8 @@ public class AST2CPPTests extends AST2BaseTest { // f(""); // } public void testCVQualifiersWithArrays_293982() throws Exception { - final String code = getAboveComment(); - parseAndCheckBindings(code, ParserLanguage.CPP); + final String code = getAboveComment(); + parseAndCheckBindings(code, ParserLanguage.CPP); } // template char (&func(T (&array)[N]))[N]; @@ -7839,8 +7839,8 @@ public class AST2CPPTests extends AST2BaseTest { // f(b); func(b); // } public void testArrayTypeSizeFromInitializer_294144() throws Exception { - final String code = getAboveComment(); - parseAndCheckBindings(code, ParserLanguage.CPP); + final String code = getAboveComment(); + parseAndCheckBindings(code, ParserLanguage.CPP); } // struct A { @@ -7850,8 +7850,8 @@ public class AST2CPPTests extends AST2BaseTest { // template struct C {}; // }; public void testLookupInClassScopeForTemplateIDs_294904() throws Exception { - final String code = getAboveComment(); - parseAndCheckBindings(code, ParserLanguage.CPP); + final String code = getAboveComment(); + parseAndCheckBindings(code, ParserLanguage.CPP); } // template char (&func(T (&array)[N]))[N]; @@ -7864,8 +7864,8 @@ public class AST2CPPTests extends AST2BaseTest { // func(A::array); // func is not resolved // } public void testCompleteArrayTypeWithIncompleteDeclaration_294144() throws Exception { - final String code = getAboveComment(); - parseAndCheckBindings(code, ParserLanguage.CPP); + final String code = getAboveComment(); + parseAndCheckBindings(code, ParserLanguage.CPP); } // void test() { @@ -7873,8 +7873,8 @@ public class AST2CPPTests extends AST2BaseTest { // return y < x ? -1 : y > x ? 1 : 0; // } public void testSyntax1_295064() throws Exception { - final String code = getAboveComment(); - parseAndCheckBindings(code, ParserLanguage.CPP); + final String code = getAboveComment(); + parseAndCheckBindings(code, ParserLanguage.CPP); } // typedef int TInt; @@ -7883,8 +7883,8 @@ public class AST2CPPTests extends AST2BaseTest { // }; // template inline CT::CT(TInt) {} public void testSyntax2_295064() throws Exception { - final String code = getAboveComment(); - parseAndCheckBindings(code, ParserLanguage.CPP); + final String code = getAboveComment(); + parseAndCheckBindings(code, ParserLanguage.CPP); } // const unsigned int EIGHT= 8; @@ -8322,7 +8322,7 @@ public class AST2CPPTests extends AST2BaseTest { // struct X { // X(); // X(X&); - // }; + // }; // void e(A); // void f(A); // void f(B);