1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Check in test to validate Bug 103578 Code completion and navigation do not work with some templates

This commit is contained in:
John Camelon 2005-07-13 16:06:30 +00:00
parent 4e5f1e1fd9
commit 8081caaf0e

View file

@ -112,6 +112,19 @@ public class AST2CPPTests extends AST2BaseTest {
parseAndCheckBindings( buffer.toString() );
}
public void testBug103578() throws Exception {
StringBuffer buffer = new StringBuffer( "template <class T, int someConst=0>\n" ); //$NON-NLS-1$
buffer.append( "class WithTemplate {};\n" ); //$NON-NLS-1$
buffer.append( "int main ()\n" ); //$NON-NLS-1$
buffer.append( "{\n" ); //$NON-NLS-1$
buffer.append( "WithTemplate <int, 10> normalInstance;\n" ); //$NON-NLS-1$
buffer.append( "const int localConst=10;\n" ); //$NON-NLS-1$
buffer.append( "WithTemplate <int, localConst> brokenInstance;\n" ); //$NON-NLS-1$
buffer.append( "return 0;\n" ); //$NON-NLS-1$
buffer.append( "}\n" ); //$NON-NLS-1$
parseAndCheckBindings( buffer.toString() );
}
public void testBug78103() throws Exception {
StringBuffer buffer = new StringBuffer( "int *p1; int *p2;\n" ); //$NON-NLS-1$
buffer.append( "union {\n" ); //$NON-NLS-1$