mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Add content assist tests for templates (failing)
This commit is contained in:
parent
5128fa2cb3
commit
a2f3ea6701
1 changed files with 29 additions and 0 deletions
|
@ -84,6 +84,7 @@ public class CompletionTests extends AbstractCompletionTest {
|
||||||
// C3* m123();
|
// C3* m123();
|
||||||
// C3* m13();
|
// C3* m13();
|
||||||
//
|
//
|
||||||
|
// template<typename T> T tConvert();
|
||||||
//private:
|
//private:
|
||||||
// void m3private();
|
// void m3private();
|
||||||
//};
|
//};
|
||||||
|
@ -94,6 +95,15 @@ public class CompletionTests extends AbstractCompletionTest {
|
||||||
// class CNS {
|
// class CNS {
|
||||||
// void mcns();
|
// void mcns();
|
||||||
// };
|
// };
|
||||||
|
//};
|
||||||
|
//template <class T> class TClass {
|
||||||
|
// T fTField;
|
||||||
|
//public:
|
||||||
|
// TClass(T tArg) : fTField(tArg) {
|
||||||
|
// }
|
||||||
|
// T add(T tOther) {
|
||||||
|
// return fTField + tOther;
|
||||||
|
// }
|
||||||
//};
|
//};
|
||||||
|
|
||||||
public CompletionTests(String name) {
|
public CompletionTests(String name) {
|
||||||
|
@ -552,4 +562,23 @@ public class CompletionTests extends AbstractCompletionTest {
|
||||||
};
|
};
|
||||||
assertCompletionResults(fCursorOffset, expected, true);
|
assertCompletionResults(fCursorOffset, expected, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//void gfunc(){TClass<int> 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<T>(void)"
|
||||||
|
};
|
||||||
|
assertCompletionResults(fCursorOffset, expected, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue