1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Code streamlining.

This commit is contained in:
Sergey Prigogin 2012-11-11 11:39:53 -08:00
parent dd9ba663b4
commit 1c570e7bbb

View file

@ -2275,8 +2275,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// f(p); // f(p);
// } // }
public void testFunctionTemplate_272848_1() throws Exception { public void testFunctionTemplate_272848_1() throws Exception {
final String code = getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <typename S> // template <typename S>
@ -2292,8 +2291,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// f(p); // f(p);
// } // }
public void testFunctionTemplate_272848_2() throws Exception { public void testFunctionTemplate_272848_2() throws Exception {
final String code = getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename T, typename U> // template<typename T, typename U>
@ -2306,8 +2304,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// f<int>(x); // f<int>(x);
// } // }
public void testFunctionTemplate_309564() throws Exception { public void testFunctionTemplate_309564() throws Exception {
final String code = getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<class U> void f1(void(*f)(const U&)) {} // template<class U> void f1(void(*f)(const U&)) {}
@ -2316,8 +2313,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// f1(&f2); // problem on f1 // f1(&f2); // problem on f1
// } // }
public void testSimplifiedFunctionTemplateWithFunctionPointer_281783() throws Exception { public void testSimplifiedFunctionTemplateWithFunctionPointer_281783() throws Exception {
final String code = getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <class T> // template <class T>
@ -2635,8 +2631,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// AI<char> y; // AI<char> y;
// AT<char> z; // AT<char> z;
public void testDefaultTemplateParameter_281781() throws Exception { public void testDefaultTemplateParameter_281781() throws Exception {
final String code = getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// class A {}; // class A {};
@ -3251,7 +3246,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// }; // };
// } // }
public void testBug238180_ArrayOutOfBounds() throws Exception { public void testBug238180_ArrayOutOfBounds() throws Exception {
// the code above used to trigger an ArrayOutOfBoundsException // The code above used to trigger an ArrayOutOfBoundsException
parse(getAboveComment(), CPP); parse(getAboveComment(), CPP);
} }
@ -3554,8 +3549,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// xt.partial; // xt.partial;
// } // }
public void testDefaultArgsWithPartialSpecialization() throws Exception { public void testDefaultArgsWithPartialSpecialization() throws Exception {
final String code = getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <typename T> class XT { // template <typename T> class XT {
@ -3960,8 +3954,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// } // }
// }; // };
public void testResolutionOfUnknownFunctions() throws Exception { public void testResolutionOfUnknownFunctions() throws Exception {
String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// class C {}; // class C {};
@ -3973,8 +3966,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// } // }
// }; // };
public void testResolutionOfUnknownArrayAccess() throws Exception { public void testResolutionOfUnknownArrayAccess() throws Exception {
String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <typename T> class CT { // template <typename T> class CT {
@ -3987,7 +3979,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// x.append(3, 'c'); // x.append(3, 'c');
// } // }
public void testConflictInTemplateArgumentDeduction() throws Exception { public void testConflictInTemplateArgumentDeduction() throws Exception {
String code= getAboveComment(); final String code= getAboveComment();
parseAndCheckBindings(code); parseAndCheckBindings(code);
BindingAssertionHelper bh= new BindingAssertionHelper(code, CPP); BindingAssertionHelper bh= new BindingAssertionHelper(code, CPP);
ICPPMethod m= bh.assertNonProblem("append(3", 6); ICPPMethod m= bh.assertNonProblem("append(3", 6);
@ -4028,10 +4020,9 @@ public class AST2TemplateTests extends AST2BaseTest {
// return A<C>(p); // return A<C>(p);
// } // }
public void testForwardDeclarations_264109() throws Exception { public void testForwardDeclarations_264109() throws Exception {
final String code = getAboveComment(); BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), CPP);
BindingAssertionHelper bh= new BindingAssertionHelper(code, CPP);
bh.assertNonProblem("A<C> make_A(C* p) {", 4, ICPPTemplateInstance.class); bh.assertNonProblem("A<C> make_A(C* p) {", 4, ICPPTemplateInstance.class);
parseAndCheckBindings(code); parseAndCheckBindings(getAboveComment());
} }
// template <typename T> class CT { // template <typename T> class CT {
@ -4044,8 +4035,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// any(CT<int>(iptr)); // any(CT<int>(iptr));
// } // }
public void testConstructorTemplateInClassTemplate_264314() throws Exception { public void testConstructorTemplateInClassTemplate_264314() throws Exception {
String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <typename T> class XT {}; // template <typename T> class XT {};
@ -4062,8 +4052,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// func(y, xy, xint); // func(y, xy, xint);
// } // }
public void testDistinctDeferredInstances_264367() throws Exception { public void testDistinctDeferredInstances_264367() throws Exception {
String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <typename T> class XT { // template <typename T> class XT {
@ -4072,8 +4061,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// } // }
// }; // };
public void testUnknownParameter_264988() throws Exception { public void testUnknownParameter_264988() throws Exception {
String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<int V> // template<int V>
@ -4084,8 +4072,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// int x = A<0>::e; // int x = A<0>::e;
// A<0>::E y; // A<0>::E y;
public void testEnumeratorInTemplateInstance_265070() throws Exception { public void testEnumeratorInTemplateInstance_265070() throws Exception {
String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename T> class CT {}; // template<typename T> class CT {};
@ -4096,10 +4083,9 @@ public class AST2TemplateTests extends AST2BaseTest {
// getline2(i); // getline2(i);
// } // }
public void testAmbiguousDeclaratorInFunctionTemplate_265342() throws Exception { public void testAmbiguousDeclaratorInFunctionTemplate_265342() throws Exception {
final String code = getAboveComment(); BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), CPP);
BindingAssertionHelper bh= new BindingAssertionHelper(code, CPP);
bh.assertNonProblem("getline2(i)", 8, ICPPTemplateInstance.class); bh.assertNonProblem("getline2(i)", 8, ICPPTemplateInstance.class);
parseAndCheckBindings(code); parseAndCheckBindings(getAboveComment());
} }
// class C { // class C {
@ -4115,8 +4101,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// }; // };
// }; // };
public void testOwnerOfFriendTemplate_265671() throws Exception { public void testOwnerOfFriendTemplate_265671() throws Exception {
final String code = getAboveComment(); BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), CPP);
BindingAssertionHelper bh= new BindingAssertionHelper(code, CPP);
IFunction f= bh.assertNonProblem("f1(", 2, IFunction.class); IFunction f= bh.assertNonProblem("f1(", 2, IFunction.class);
IBinding owner= f.getOwner(); IBinding owner= f.getOwner();
assertNull(owner); assertNull(owner);
@ -4133,7 +4118,7 @@ public class AST2TemplateTests extends AST2BaseTest {
tpar= bh.assertNonProblem("T3", 2, ICPPTemplateParameter.class); tpar= bh.assertNonProblem("T3", 2, ICPPTemplateParameter.class);
assertEquals(2, tpar.getTemplateNestingLevel()); assertEquals(2, tpar.getTemplateNestingLevel());
parseAndCheckBindings(code); parseAndCheckBindings(getAboveComment());
} }
// template <typename T> void f(T t) { // template <typename T> void f(T t) {
@ -4141,13 +4126,12 @@ public class AST2TemplateTests extends AST2BaseTest {
// } // }
// template <typename T> void g(T t) {} // template <typename T> void g(T t) {}
public void testDependentNameReferencingLaterDeclaration_265926a() throws Exception { public void testDependentNameReferencingLaterDeclaration_265926a() throws Exception {
final String code = getAboveComment(); BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), CPP);
BindingAssertionHelper bh= new BindingAssertionHelper(code, CPP);
IFunction gref= bh.assertNonProblem("g(t)", 1); IFunction gref= bh.assertNonProblem("g(t)", 1);
assertInstance(gref, ICPPUnknownBinding.class); assertInstance(gref, ICPPUnknownBinding.class);
IFunction gdecl= bh.assertNonProblem("g(T t)", 1); IFunction gdecl= bh.assertNonProblem("g(T t)", 1);
parseAndCheckBindings(code); parseAndCheckBindings(getAboveComment());
} }
// class C; // class C;
@ -4167,8 +4151,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// void a() {}; // void a() {};
// }; // };
public void testDependentNameReferencingLaterDeclaration_265926b() throws Exception { public void testDependentNameReferencingLaterDeclaration_265926b() throws Exception {
final String code = getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename T> class XT { // template<typename T> class XT {
@ -4179,22 +4162,20 @@ public class AST2TemplateTests extends AST2BaseTest {
// } // }
// }; // };
public void testDeferredConversionOperator() throws Exception { public void testDeferredConversionOperator() throws Exception {
final String code = getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <typename T> class X {}; // template <typename T> class X {};
// template <typename T> class X1 { // template <typename T> class X1 {
// friend class X<T>; // friend class X<T>;
// }; // };
// template <typename T> class Y : X1<int> { // template <typename T> class Y : X1<int> {
// void test() { // void test() {
// X<int> x; // problem binding on X<int> // X<int> x; // problem binding on X<int>
// } // }
// }; // };
public void testFriendClassTemplate_266992() throws Exception { public void testFriendClassTemplate_266992() throws Exception {
final String code = getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <int N> // template <int N>
@ -4233,8 +4214,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// f(p); // f(p);
// } // }
public void testTemplateConversionOperator_271948_1() throws Exception { public void testTemplateConversionOperator_271948_1() throws Exception {
final String code = getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <typename T> // template <typename T>
@ -4253,16 +4233,14 @@ public class AST2TemplateTests extends AST2BaseTest {
// f(x); // f(x);
// } // }
public void testTemplateConversionOperator_271948_2() throws Exception { public void testTemplateConversionOperator_271948_2() throws Exception {
final String code = getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<unsigned int> struct ST{}; // template<unsigned int> struct ST{};
// template<template<unsigned int> class T> class CT {}; // template<template<unsigned int> class T> class CT {};
// typedef CT<ST> TDef; // typedef CT<ST> TDef;
public void testUsingTemplateTemplateParameter_279619() throws Exception { public void testUsingTemplateTemplateParameter_279619() throws Exception {
final String code = getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <int N> void T(int (&array)[N]) {}; // template <int N> void T(int (&array)[N]) {};
@ -4271,8 +4249,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// T<2>(a); // T<2>(a);
// } // }
public void testInstantiationOfArraySize_269926() throws Exception { public void testInstantiationOfArraySize_269926() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <typename T> class CT { // template <typename T> class CT {
@ -4281,8 +4258,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// void CT<int>::init(void) { // void CT<int>::init(void) {
// } // }
public void testMethodSpecialization_322988() throws Exception { public void testMethodSpecialization_322988() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code, CPP);
} }
@ -4296,8 +4272,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// f(x); // f(x);
// } // }
public void testInlineFriendFunction_284690_1() throws Exception { public void testInlineFriendFunction_284690_1() throws Exception {
final String code = getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <typename T> // template <typename T>
@ -4335,8 +4310,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// typedef NullType Type; // typedef NullType Type;
// }; // };
public void testDefaultArgument_289132() throws Exception { public void testDefaultArgument_289132() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename T> class XT { // template<typename T> class XT {
@ -4395,8 +4369,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// f(ch, cint); // f(ch, cint);
// } // }
public void testFunctionTemplateOrdering_293468() throws Exception { public void testFunctionTemplateOrdering_293468() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <typename T> void func(T* t) {}; // template <typename T> void func(T* t) {};
@ -4413,8 +4386,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// func1 (a); // func1 (a);
// } // }
public void testFunctionTemplateOrdering_294539() throws Exception { public void testFunctionTemplateOrdering_294539() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename T> class CT {}; // template<typename T> class CT {};
@ -4427,8 +4399,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// return a; // return a;
// } // }
public void testClosingAngleBrackets1_261268() throws Exception { public void testClosingAngleBrackets1_261268() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename T> class CT {}; // template<typename T> class CT {};
@ -4457,8 +4428,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// a < a >> (1+2); // binary expression via ambiguity // a < a >> (1+2); // binary expression via ambiguity
// } // }
public void testClosingAngleBracketsAmbiguity_261268() throws Exception { public void testClosingAngleBracketsAmbiguity_261268() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// #define OPASSIGN(x) x##= // #define OPASSIGN(x) x##=
@ -4467,8 +4437,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// a OPASSIGN(>>) 1; // a OPASSIGN(>>) 1;
// } // }
public void testTokenPasteShiftROperator_261268() throws Exception { public void testTokenPasteShiftROperator_261268() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <class T> class X { // template <class T> class X {
@ -4602,16 +4571,14 @@ public class AST2TemplateTests extends AST2BaseTest {
// CTx<1,2> c; // CTx<1,2> c;
// } // }
public void testNonTypeTemplateParameterPack_280909() throws Exception { public void testNonTypeTemplateParameterPack_280909() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename... Types> // template<typename... Types>
// struct count { static const int value = sizeof...(Types); // struct count { static const int value = sizeof...(Types);
// }; // };
public void testVariadicTemplateExamples_280909a() throws Exception { public void testVariadicTemplateExamples_280909a() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename... T> void f(T (* ...t)(int, int)); // template<typename... T> void f(T (* ...t)(int, int));
@ -4621,8 +4588,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// f(add, subtract); // f(add, subtract);
// } // }
public void testVariadicTemplateExamples_280909b() throws Exception { public void testVariadicTemplateExamples_280909b() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename... Mixins> // template<typename... Mixins>
@ -4631,15 +4597,13 @@ public class AST2TemplateTests extends AST2BaseTest {
// X(const Mixins&... mixins) : Mixins(mixins)... { } // X(const Mixins&... mixins) : Mixins(mixins)... { }
// }; // };
public void testVariadicTemplateExamples_280909c() throws Exception { public void testVariadicTemplateExamples_280909c() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<class... Types> class Tuple; // Types is a template type parameter pack // template<class... Types> class Tuple; // Types is a template type parameter pack
// template<class T, int... Dims> struct multi array; // Dims is a non-type template parameter pack // template<class T, int... Dims> struct multi array; // Dims is a non-type template parameter pack
public void testVariadicTemplateExamples_280909d() throws Exception { public void testVariadicTemplateExamples_280909d() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<class T = char> class String; // template<class T = char> class String;
@ -4748,8 +4712,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// f<int*, float*>(0, 0, 0); // Types is the sequence int*, float*, int // f<int*, float*>(0, 0, 0); // Types is the sequence int*, float*, int
// } // }
public void testVariadicTemplateExamples_280909j() throws Exception { public void testVariadicTemplateExamples_280909j() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<class... Types> void f(Types&...); // template<class... Types> void f(Types&...);
@ -4760,8 +4723,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// g(x, y, z); // T1 is deduced to int, Types is deduced to float, int // g(x, y, z); // T1 is deduced to int, Types is deduced to float, int
// } // }
public void testVariadicTemplateExamples_280909k() throws Exception { public void testVariadicTemplateExamples_280909k() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<class> struct X { }; // template<class> struct X { };
@ -4778,8 +4740,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// Y<int, float, double> y3; // uses primary template, Types contains int, float, double // Y<int, float, double> y3; // uses primary template, Types contains int, float, double
// int fv = f(g); // okay, Types contains int, float // int fv = f(g); // okay, Types contains int, float
public void testVariadicTemplateExamples_280909n() throws Exception { public void testVariadicTemplateExamples_280909n() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename... Types> struct Tuple { }; // template<typename... Types> struct Tuple { };
@ -4805,8 +4766,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// f(2, 1.0); // okay: args contains two arguments, an int and a double // f(2, 1.0); // okay: args contains two arguments, an int and a double
// } // }
public void testVariadicTemplateExamples_280909q() throws Exception { public void testVariadicTemplateExamples_280909q() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename... Types> void f(Types... rest); // template<typename... Types> void f(Types... rest);
@ -4814,8 +4774,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// f(&rest...); // '&rest...' is a pack expansion, '&rest' is its pattern // f(&rest...); // '&rest...' is a pack expansion, '&rest' is its pattern
// } // }
public void testVariadicTemplateExamples_280909r() throws Exception { public void testVariadicTemplateExamples_280909r() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename...> struct Tuple {}; // template<typename...> struct Tuple {};
@ -4865,8 +4824,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// bind(&Test::Update); // bind(&Test::Update);
// } // }
public void testFunctionOrdering_299608() throws Exception { public void testFunctionOrdering_299608() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <class T, class U = double> void f(T t = 0, U u = 0); // template <class T, class U = double> void f(T t = 0, U u = 0);
@ -4975,8 +4933,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// CT<int>::CT() : value_(0) { // CT<int>::CT() : value_(0) {
// } // }
public void testConstructorOfExplicitSpecialization() throws Exception { public void testConstructorOfExplicitSpecialization() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <typename T> struct CT; // template <typename T> struct CT;
@ -5024,8 +4981,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// CT<const int>::T2 b; // CT<const int>::T2 b;
// } // }
public void testBug306213c() throws Exception { public void testBug306213c() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename T1, typename T2> class CT {}; // template<typename T1, typename T2> class CT {};
@ -5102,7 +5058,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// template void N::f<int>(int&); // template void N::f<int>(int&);
// template<> void N::f<long>(long&) {} // template<> void N::f<long>(long&) {}
public void testInlineNamespaces_305980() throws Exception { public void testInlineNamespaces_305980() throws Exception {
final String code= getAboveComment(); final String code = getAboveComment();
parseAndCheckBindings(code); parseAndCheckBindings(code);
BindingAssertionHelper bh= new BindingAssertionHelper(code, CPP); BindingAssertionHelper bh= new BindingAssertionHelper(code, CPP);
ICPPFunctionTemplate ft= bh.assertNonProblem("f(T&)", 1); ICPPFunctionTemplate ft= bh.assertNonProblem("f(T&)", 1);
@ -5138,8 +5094,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// g(x); // g(x);
// } // }
public void testUnnamedTypesAsTemplateArgument_316317a() throws Exception { public void testUnnamedTypesAsTemplateArgument_316317a() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template <class T> class X { }; // template <class T> class X { };
@ -5158,8 +5113,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// f(b); // OK // f(b); // OK
// } // }
public void testUnnamedTypesAsTemplateArgument_316317b() throws Exception { public void testUnnamedTypesAsTemplateArgument_316317b() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// struct S { // struct S {
@ -5175,8 +5129,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// (x + 1)->s; // (x + 1)->s;
// } // }
public void testOverloadResolutionBetweenMethodTemplateAndFunction() throws Exception { public void testOverloadResolutionBetweenMethodTemplateAndFunction() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename ...T> void f(T..., T...); // template<typename ...T> void f(T..., T...);
@ -5184,8 +5137,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// f(1,1); // f(1,1);
// } // }
public void testFunctionParameterPacksInNonFinalPosition_324096() throws Exception { public void testFunctionParameterPacksInNonFinalPosition_324096() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename _CharT> struct OutStream { // template<typename _CharT> struct OutStream {
@ -5693,8 +5645,7 @@ public class AST2TemplateTests extends AST2BaseTest {
// typedef r::s t; // typedef r::s t;
// t::u x; // t::u x;
public void testBoolExpressionAsTemplateArgument_361604() throws Exception { public void testBoolExpressionAsTemplateArgument_361604() throws Exception {
final String code= getAboveComment(); parseAndCheckBindings();
parseAndCheckBindings(code);
} }
// template<typename T> struct B { // template<typename T> struct B {