From 87539d04dd0cfb6a98f1f0e951e56fc04b11780b Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Fri, 25 Apr 2014 17:04:53 -0700 Subject: [PATCH] Added a failing test for inherited constructor template. --- .../core/parser/tests/ast2/AST2CPPTests.java | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 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 f5fa1afd401..ccb3c6998d7 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 @@ -1353,7 +1353,7 @@ public class AST2CPPTests extends AST2TestBase { // int test() { // foo(1); // } - public void testInheritingConstructor() throws Exception { + public void testInheritedConstructor() throws Exception { parseAndCheckBindings(); } @@ -1371,7 +1371,7 @@ public class AST2CPPTests extends AST2TestBase { // int test() { // foo(1); // } - public void testInheritingConstructorWithTemplate_1() throws Exception { + public void testInheritedConstructorFromTemplateInstance() throws Exception { parseAndCheckBindings(); } @@ -1389,7 +1389,28 @@ public class AST2CPPTests extends AST2TestBase { // int test() { // foo(1); // } - public void testInheritingConstructorWithTemplate_2() throws Exception { + public void testInheritedConstructorFromUnknownClass() throws Exception { + parseAndCheckBindings(); + } + + // template + // struct A {}; + // + // struct B { + // template + // B(const A&, int i = 3); + // }; + // + // struct C : public B { + // using B::B; + // }; + // + // void foo(C); + // + // void test(A a) { + // foo(a); + // } + public void _testInheritedTemplateConstructor() throws Exception { parseAndCheckBindings(); }