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:
parent
4e5f1e1fd9
commit
8081caaf0e
1 changed files with 13 additions and 0 deletions
|
@ -111,6 +111,19 @@ public class AST2CPPTests extends AST2BaseTest {
|
|||
buffer.append( "};\n" ); //$NON-NLS-1$
|
||||
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$
|
||||
|
|
Loading…
Add table
Reference in a new issue