diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java index 6280cef3f17..69fa6f16fe9 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java @@ -1369,16 +1369,14 @@ public class AST2TemplateTests extends AST2TestBase { } // template - // class A { - // public: + // struct A { // class B {}; // }; // // class C {}; class D {}; // // template<> - // class A { - // public: + // struct A { // class B {}; // }; // @@ -1406,10 +1404,8 @@ public class AST2TemplateTests extends AST2TestBase { // class A {}; // // template - // class X { - // public: - // class Y { - // public: + // struct X { + // struct Y { // class Z {}; // }; // }; @@ -1434,8 +1430,7 @@ public class AST2TemplateTests extends AST2TestBase { // class X {}; // // template - // class X { - // public: + // struct X { // class N {}; // }; // @@ -1667,7 +1662,7 @@ public class AST2TemplateTests extends AST2TestBase { // iterator begin(); // iterator end(); // }; - // class Bar { public: int foo; }; + // struct Bar { int foo; }; // void f() { // list bar; // for(list::iterator i = bar.begin(); i != bar.end(); ++i){ @@ -1973,13 +1968,14 @@ public class AST2TemplateTests extends AST2TestBase { assertSame(((ICPPTemplateInstance)A).getTemplateDefinition(), Aspec); } - // template< class T > class A : public T {}; - // class C { public: int c; }; - // class B : public A { }; - // void main(){ + // template + // class A : public T {}; + // class C { public: int c; }; + // class B : public A { }; + // void main() { // B k; // k.c; - // } + // } public void testBug105769() throws Exception { IASTTranslationUnit tu = parse(getAboveComment(), CPP, true, true); NameCollector col = new NameCollector(); @@ -1989,12 +1985,13 @@ public class AST2TemplateTests extends AST2TestBase { assertSame(c, col.getName(4).resolveBinding()); } - // template< class T > class C { + // template + // class C { // public: void * blah; // template C(G* g) : blah(g) {} // template <> C(char * c) : blah(c) {} // template <> C(wchar_t * c) : blah(c) {} - // }; + // }; public void testBug162230() throws Exception { IASTTranslationUnit tu = parse(getAboveComment(), CPP, true, true); NameCollector col = new NameCollector(); @@ -2028,8 +2025,8 @@ public class AST2TemplateTests extends AST2TestBase { assertSame(c2, col.getName(16).resolveBinding()); } - // template< class T > class C {}; - // typedef struct C CInt; + // template< class T > class C {}; + // typedef struct C CInt; public void testBug169628() throws Exception { IASTTranslationUnit tu = parse(getAboveComment(), CPP, true, true); NameCollector col = new NameCollector(); diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java index 4653d563505..8602fa3d843 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java @@ -1045,7 +1045,8 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa // void func(U& u, const typename U::t& v) { // } - // template struct A { + // template + // struct A { // typedef T t; // }; //