1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Moved Template of Variable test case to Failed tests

This commit is contained in:
John Camelon 2003-07-24 17:20:07 +00:00
parent 6e1589de13
commit 62d269c6f8
5 changed files with 26 additions and 7 deletions

View file

@ -1,3 +1,9 @@
2003-07-24 Hoda Amer
Moved part of the CModelElementsTest (Templates of Variables ) to the failed tests.
2003-07-24 Hoda Amer
This patch updates the CModelBuilder to use the AST instead of the DOM.
2003-07-24 John Camelon
Updated CompleteParseASTTests.

View file

@ -31,5 +31,13 @@ public class STLFailedTests extends BaseASTTest {
code.write("{};\n");
assertCodeFailsParse(code.toString());
}
public void testBug40714() throws Exception{
// templates of variables
Writer code = new StringWriter();
code.write("template <bool __threads, int __inst>\n");
code.write("char* default_alloc_template<__threads, __inst>::_S_start_free = 0;\n");
assertCodeFailsParse(code.toString());
}
}

View file

@ -442,12 +442,14 @@ public class CModelElementsTests extends TestCase {
assertEquals(st.getTemplateSignature(), new String("mystruct<T, Tibor>"));
checkLineNumbers((CElement)st, 125, 126);
// moved to failed tests
// also commented in the source file
// template variable
ArrayList variableTemplates = namespace.getChildrenOfType(ICElement.C_TEMPLATE_VARIABLE);
VariableTemplate vt = (VariableTemplate)variableTemplates.get(0);
assertEquals(vt.getElementName(), new String("default_alloc_template<__threads,__inst>::_S_start_free"));
assertEquals(vt.getTemplateSignature(), new String("default_alloc_template<__threads,__inst>::_S_start_free<bool, int> : char*"));
checkLineNumbers((CElement)vt, 128, 129);
// ArrayList variableTemplates = namespace.getChildrenOfType(ICElement.C_TEMPLATE_VARIABLE);
// VariableTemplate vt = (VariableTemplate)variableTemplates.get(0);
// assertEquals(vt.getElementName(), new String("default_alloc_template<__threads,__inst>::_S_start_free"));
// assertEquals(vt.getTemplateSignature(), new String("default_alloc_template<__threads,__inst>::_S_start_free<bool, int> : char*"));
// checkLineNumbers((CElement)vt, 128, 129);
}
private void checkArrays(IParent tu){

View file

@ -125,8 +125,8 @@ namespace MyPackage
template<class T, typename Tibor = junk>
struct mystruct { /* */ };
// template variable
template <bool __threads, int __inst>
char* default_alloc_template<__threads, __inst>::_S_start_free = 0;
// template <bool __threads, int __inst>
// char* default_alloc_template<__threads, __inst>::_S_start_free = 0;
};
// check arrays
// arrays

View file

@ -1,3 +1,6 @@
2003-07-24 Hoda Amer
This patch updates the CModelBuilder to use the AST instead of the DOM.
2003-07-23 Bogdan Gheorghe
Added checkbox to Indexer tab to turn on dependency tree
service