mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 04:15:35 +02:00
test for bug 57513
This commit is contained in:
parent
1aa7ee77fe
commit
6f0adebd47
1 changed files with 23 additions and 0 deletions
|
@ -46,6 +46,7 @@ import org.eclipse.cdt.core.parser.ast.IASTVariableReference;
|
||||||
import org.eclipse.cdt.core.parser.ast.gcc.IASTGCCExpression;
|
import org.eclipse.cdt.core.parser.ast.gcc.IASTGCCExpression;
|
||||||
import org.eclipse.cdt.core.parser.ast.gcc.IASTGCCSimpleTypeSpecifier;
|
import org.eclipse.cdt.core.parser.ast.gcc.IASTGCCSimpleTypeSpecifier;
|
||||||
import org.eclipse.cdt.internal.core.parser.ParserException;
|
import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||||
|
import org.eclipse.ui.views.tasklist.TaskList;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1763,6 +1764,28 @@ public class CompleteParseASTTest extends CompleteParseBaseTest
|
||||||
assertReferenceTask( new Task( A, 2, false, false ) );
|
assertReferenceTask( new Task( A, 2, false, false ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void test575513_qualified() throws Exception
|
||||||
|
{
|
||||||
|
Writer writer = new StringWriter();
|
||||||
|
writer.write( "namespace Foo{ " );
|
||||||
|
writer.write( " class Bar{ public : Bar(); }; " );
|
||||||
|
writer.write( "} " );
|
||||||
|
writer.write( "void main(){ " );
|
||||||
|
writer.write( " Foo::Bar * bar = new Foo::Bar(); " );
|
||||||
|
writer.write( "} " );
|
||||||
|
|
||||||
|
Iterator i = parse( writer.toString() ).getDeclarations();
|
||||||
|
|
||||||
|
IASTNamespaceDefinition namespace = (IASTNamespaceDefinition) i.next();
|
||||||
|
IASTFunction main = (IASTFunction) i.next();
|
||||||
|
i = getDeclarations( namespace );
|
||||||
|
IASTClassSpecifier Bar = (IASTClassSpecifier) ((IASTAbstractTypeSpecifierDeclaration)i.next() ).getTypeSpecifier();
|
||||||
|
i = getDeclarations( Bar );
|
||||||
|
IASTMethod constructor = (IASTMethod) i.next();
|
||||||
|
|
||||||
|
assertAllReferences( 4, createTaskList( new Task(namespace, 2 ), new Task( Bar, 1 ), new Task( constructor, 1 ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
public void testBug60944() throws Exception
|
public void testBug60944() throws Exception
|
||||||
{
|
{
|
||||||
Writer writer = new StringWriter();
|
Writer writer = new StringWriter();
|
||||||
|
|
Loading…
Add table
Reference in a new issue