1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Updates a test-case to expect case-insensitive completion proposals.

This commit is contained in:
Markus Schorn 2007-02-26 10:25:28 +00:00
parent 94a8afb3a3
commit 25d77f4ed2

View file

@ -14,6 +14,7 @@
*/ */
package org.eclipse.cdt.core.parser.tests.ast2; package org.eclipse.cdt.core.parser.tests.ast2;
import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import org.eclipse.cdt.core.dom.ast.ASTSignatureUtil; import org.eclipse.cdt.core.dom.ast.ASTSignatureUtil;
@ -2169,8 +2170,21 @@ public class AST2CPPTests extends AST2BaseTest {
tu.accept(col); tu.accept(col);
IASTName name = col.getName(11); IASTName name = col.getName(11);
assertEquals("a", name.toString());
IBinding[] bs = CPPSemantics.findBindingsForContentAssist(name, true); IBinding[] bs = CPPSemantics.findBindingsForContentAssist(name, true);
assertEquals(4, bs.length);
// check the result
HashSet result= new HashSet();
for (int i = 0; i < bs.length; i++) {
IBinding binding = bs[i];
result.add(binding.getName());
}
assertTrue(result.contains("a1"));
assertTrue(result.contains("a2"));
assertTrue(result.contains("a3"));
assertTrue(result.contains("a4"));
assertTrue(result.contains("A"));
assertEquals(5, bs.length);
} }
public void testIsStatic() throws Exception { public void testIsStatic() throws Exception {