From a2f3ea67014adf8d71a84d96fe6f48b32d3c77e8 Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Thu, 1 Feb 2007 08:59:01 +0000 Subject: [PATCH] Add content assist tests for templates (failing) --- .../text/contentassist2/CompletionTests.java | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests.java index a18a17dce4e..40f6c5a834f 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests.java @@ -84,6 +84,7 @@ public class CompletionTests extends AbstractCompletionTest { // C3* m123(); // C3* m13(); // +// template T tConvert(); //private: // void m3private(); //}; @@ -94,6 +95,15 @@ public class CompletionTests extends AbstractCompletionTest { // class CNS { // void mcns(); // }; +//}; +//template class TClass { +// T fTField; +//public: +// TClass(T tArg) : fTField(tArg) { +// } +// T add(T tOther) { +// return fTField + tOther; +// } //}; public CompletionTests(String name) { @@ -552,4 +562,23 @@ public class CompletionTests extends AbstractCompletionTest { }; assertCompletionResults(fCursorOffset, expected, true); } + + //void gfunc(){TClass t(0); t./*cursor*/ + public void _testTemplateClassMethod() throws Exception { + // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=172436 + final String[] expected= { + "add(T)" + }; + assertCompletionResults(fCursorOffset, expected, true); + } + + //void gfunc(){C3 c3; c3.t/*cursor*/ + public void _testTemplateMethod() throws Exception { + // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=172436 + final String[] expected= { + "tConvert(void)" +// "tConvert(void)" + }; + assertCompletionResults(fCursorOffset, expected, true); + } }