mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-24 16:53:50 +02:00
Fixed testBug40714() to faiil properly.
This commit is contained in:
parent
136320038c
commit
c6b470a797
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
2003-07-27 John Camelon
|
||||||
|
Fixed failedTests::testBug40714() to fail properly.
|
||||||
|
|
||||||
2003-07-25 Bogdan Gheorghe
|
2003-07-25 Bogdan Gheorghe
|
||||||
Added new indexer test for refs
|
Added new indexer test for refs
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,9 @@ package org.eclipse.cdt.core.parser.failedTests;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.parser.ast.IASTCompilationUnit;
|
||||||
|
import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
|
||||||
|
import org.eclipse.cdt.core.parser.ast.IASTVariable;
|
||||||
import org.eclipse.cdt.core.parser.tests.BaseASTTest;
|
import org.eclipse.cdt.core.parser.tests.BaseASTTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,7 +40,11 @@ public class STLFailedTests extends BaseASTTest {
|
||||||
Writer code = new StringWriter();
|
Writer code = new StringWriter();
|
||||||
code.write("template <bool __threads, int __inst>\n");
|
code.write("template <bool __threads, int __inst>\n");
|
||||||
code.write("char* default_alloc_template<__threads, __inst>::_S_start_free = 0;\n");
|
code.write("char* default_alloc_template<__threads, __inst>::_S_start_free = 0;\n");
|
||||||
assertCodeFailsParse(code.toString());
|
IASTCompilationUnit cu = parse(code.toString());
|
||||||
|
IASTTemplateDeclaration templateDecl = (IASTTemplateDeclaration) cu.getDeclarations().next();
|
||||||
|
// should not get this exception
|
||||||
|
IASTVariable v = (IASTVariable) templateDecl.getOwnedDeclaration();
|
||||||
|
assertEquals( v, null );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue