1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-30 21:55:31 +02:00

Fixed testBug40714() to faiil properly.

This commit is contained in:
John Camelon 2003-07-28 00:28:24 +00:00
parent 136320038c
commit c6b470a797
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,6 @@
2003-07-27 John Camelon
Fixed failedTests::testBug40714() to fail properly.
2003-07-25 Bogdan Gheorghe
Added new indexer test for refs

View file

@ -12,6 +12,9 @@ package org.eclipse.cdt.core.parser.failedTests;
import java.io.StringWriter;
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;
/**
@ -37,7 +40,11 @@ public class STLFailedTests extends BaseASTTest {
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());
IASTCompilationUnit cu = parse(code.toString());
IASTTemplateDeclaration templateDecl = (IASTTemplateDeclaration) cu.getDeclarations().next();
// should not get this exception
IASTVariable v = (IASTVariable) templateDecl.getOwnedDeclaration();
assertEquals( v, null );
}
}