From e65e1eabc16811afda1815ba5324c4d7e2f1670e Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Thu, 20 Oct 2011 21:27:55 -0700 Subject: [PATCH] Test case for bug 361604. --- .../parser/tests/ast2/AST2TemplateTests.java | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) 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 fcf464d0da3..980e4b0d4eb 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 @@ -5470,7 +5470,7 @@ public class AST2TemplateTests extends AST2BaseTest { public void testTemplateTemplateParameterMatching_352859() throws Exception { parseAndCheckBindings(); } - + // template T f(); // template<> int f() { // return 0; @@ -5482,7 +5482,7 @@ public class AST2TemplateTests extends AST2BaseTest { ICPPTemplateInstance inst= bh.assertNonProblem("f() {", 1); assertSame(template, inst.getTemplateDefinition()); } - + // template class A{}; // template class A{}; // template class A{}; @@ -5497,7 +5497,7 @@ public class AST2TemplateTests extends AST2BaseTest { public void testExplicitSpecializationOfForbiddenAsImplicit_356818() throws Exception { parseAndCheckBindings(); } - + // struct A { // void f() { } // }; @@ -5522,14 +5522,14 @@ public class AST2TemplateTests extends AST2BaseTest { public void testSpecializationOfUsingDeclaration_357293() throws Exception { parseAndCheckBindings(); } - + // template struct SS {}; // template > class Cont> // Cont f() {} public void testReferenceToParameterOfTemplateTemplateParameter_357308() throws Exception { parseAndCheckBindings(); } - + // template void f() {} // void test() { // f(); @@ -5538,4 +5538,26 @@ public class AST2TemplateTests extends AST2BaseTest { public void testTemplateArgumentDeductionWithoutParameters_358654() throws Exception { parseAndCheckBindings(); } + + // template + // struct C { + // typedef int s; + // }; + // + // template + // struct C { + // typedef T s; + // }; + // + // struct B { + // typedef B u; + // }; + // + // typedef C r; + // typedef r::s t; + // t::u x; + public void _testBoolExpressionAsTemplateArgument_361604() throws Exception { + final String code= getAboveComment(); + parseAndCheckBindings(code); + } }