From a92398bdf6bae33e5151140c628acd7c130d6252 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Sun, 18 Apr 2010 00:50:34 +0000 Subject: [PATCH] Test case for bug 309564. --- .../parser/tests/ast2/AST2TemplateTests.java | 23 +++++++++++++++---- 1 file changed, 18 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 9b521960ee1..c965ea2641c 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 @@ -2276,7 +2276,20 @@ public class AST2TemplateTests extends AST2BaseTest { parseAndCheckBindings(code); } - + // template + // T f(U* f) {} + // + // template + // T f(U& f) {} + // + // void test(int* x) { + // f(x); + // } + public void _testFunctionTemplate_309564() throws Exception { + final String code = getAboveComment(); + parseAndCheckBindings(code); + } + // template void f1(void(*f)(const U&)) {} // void f2(const int& b){} // void test() { @@ -4713,7 +4726,7 @@ public class AST2TemplateTests extends AST2BaseTest { // template void f(Types... rest); // template void g(Types... rest) { - // 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 { final String code= getAboveComment(); @@ -4735,10 +4748,10 @@ public class AST2TemplateTests extends AST2BaseTest { // template void f(Args... args) {} // template void h(Args... args) {} // template void g(Args... args) { - // f(const_cast(&args)...); // okay: ‘‘Args’’ and ‘‘args’’ are expanded + // f(const_cast(&args)...); // okay: ��Args�� and ��args�� are expanded // f(5 ...); // error: pattern does not contain any parameter packs - // f(args); // error: parameter pack ”args” is not expanded - // f(h(args...) + args...); // okay: first ‘‘args’’ expanded within h, second ‘‘args’’ expanded within f. + // f(args); // error: parameter pack �args� is not expanded + // f(h(args...) + args...); // okay: first ��args�� expanded within h, second ��args�� expanded within f. // } public void testVariadicTemplateExamples_280909s() throws Exception { final String code= getAboveComment();