From a5bc44b2bc3b1ccdf05afb9b925c7623dca484c7 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Sun, 1 Mar 2009 23:34:34 +0000 Subject: [PATCH] Test case for bug 266532. --- .../parser/tests/ast2/AST2TemplateTests.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 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 2e3ce6aadd2..056952bce1f 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 @@ -2201,7 +2201,7 @@ public class AST2TemplateTests extends AST2BaseTest { // pair p = make_pair(1, 2); public void testFunctionTemplateWithUsing() throws Exception { BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true); - ICPPFunction fn= bh.assertNonProblem("make_pair(1", 9, ICPPFunction.class); + bh.assertNonProblem("make_pair(1", 9, ICPPFunction.class); } // template @@ -2222,7 +2222,22 @@ public class AST2TemplateTests extends AST2BaseTest { bh.assertNonProblem("f(a(x));", 1, ICPPFunction.class); } - // // Brian W.'s example from bugzilla#167098 + // template + // void f(void (T::*member)(P)); + // + // struct A { + // void m(int& p); + // }; + // + // void test() { + // f(&A::m); + // } + public void _testFunctionTemplate_266532() throws Exception { + BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true); + bh.assertNonProblem("f(&A::m);", 1, ICPPFunction.class); + } + + // // Brian W.'s example from bugzilla#167098 // template // class D { //CPPClassTemplate // public: