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

Fix for Bug 151207 - Content assist fails due to lack of completion node (patch by Bryan Wilkinson)

This commit is contained in:
Anton Leherbauer 2007-01-26 15:46:53 +00:00
parent dedbb3093d
commit b07a1851fa
29 changed files with 175 additions and 193 deletions

View file

@ -8,6 +8,7 @@
* Contributors: * Contributors:
* IBM Corporation - initial API and implementation * IBM Corporation - initial API and implementation
* Markus Schorn (Wind River Systems) * Markus Schorn (Wind River Systems)
* Bryan Wilkinson (QNX) - https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp; package org.eclipse.cdt.internal.core.dom.parser.cpp;
@ -4471,6 +4472,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
break; break;
case IToken.tCOLONCOLON: case IToken.tCOLONCOLON:
case IToken.tIDENTIFIER: case IToken.tIDENTIFIER:
case IToken.tCOMPLETION:
// to get templates right we need to use the class as the scope // to get templates right we need to use the class as the scope
ITokenDuple d = name(); ITokenDuple d = name();
name = createName(d); name = createName(d);
@ -4506,6 +4508,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
continue baseSpecifierLoop; continue baseSpecifierLoop;
case IToken.tLBRACE: case IToken.tLBRACE:
case IToken.tEOC:
if (name == null) if (name == null)
name = createName(); name = createName();
baseSpec = createBaseSpecifier(); baseSpec = createBaseSpecifier();

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2006 IBM Corporation and others. * Copyright (c) 2004, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -8,6 +8,7 @@
* Contributors: * Contributors:
* IBM Corporation - initial implementation * IBM Corporation - initial implementation
* Markus Schorn (Wind River Systems) * Markus Schorn (Wind River Systems)
* Bryan Wilkinson (QNX) - https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.parser.scanner2; package org.eclipse.cdt.internal.core.parser.scanner2;
@ -2036,7 +2037,7 @@ abstract class BaseScanner implements IScanner {
} }
// We've run out of contexts, our work is done here // We've run out of contexts, our work is done here
return contentAssistMode ? eocToken : null; return contentAssistMode ? new SimpleToken(IToken.tCOMPLETION, Integer.MAX_VALUE, null, Integer.MAX_VALUE) : null;
} }
protected CharTable ident = new CharTable(1024); protected CharTable ident = new CharTable(1024);

View file

@ -41,8 +41,8 @@ public class CompletionTest_ArgumentType_NoPrefix extends CompletionProposalsBa
public CompletionTest_ArgumentType_NoPrefix(String name) { public CompletionTest_ArgumentType_NoPrefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
setExpectFailure(151207); setExpectFailure(169860);
} }
public static Test suite() { public static Test suite() {

View file

@ -41,8 +41,8 @@ public class CompletionTest_ArgumentType_NoPrefix2 extends CompletionProposalsB
public CompletionTest_ArgumentType_NoPrefix2(String name) { public CompletionTest_ArgumentType_NoPrefix2(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
setExpectFailure(151207); setExpectFailure(169860);
} }
public static Test suite() { public static Test suite() {

View file

@ -33,20 +33,11 @@ public class CompletionTest_ArgumentType_Prefix extends CompletionProposalsBase
"anEnumeration", "anEnumeration",
// missing proposal: // missing proposal:
"AStruct" "AStruct"
/* FIXME: Additional results which should not be there. Run with trace enabled to reproduce:
Result: aFirstEnum
Result: aFunction(void) bool
Result: anotherFunction(void) void
Result: aSecondEnum
Result: aThirdEnum
Result: aVariable : int
*/
}; };
public CompletionTest_ArgumentType_Prefix(String name) { public CompletionTest_ArgumentType_Prefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724 // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724
// and https://bugs.eclipse.org/bugs/show_bug.cgi?id=88787
setExpectFailure(109724); setExpectFailure(109724);
} }

View file

@ -33,20 +33,11 @@ public class CompletionTest_ArgumentType_Prefix2 extends CompletionProposalsBas
"anEnumeration", "anEnumeration",
// missing proposal: // missing proposal:
"AStruct" "AStruct"
/* FIXME: Additional results which should not be there. Run with trace enabled to reproduce:
Result: aFirstEnum
Result: aFunction(void) bool
Result: anotherFunction(void) void
Result: aSecondEnum
Result: aThirdEnum
Result: aVariable : int
*/
}; };
public CompletionTest_ArgumentType_Prefix2(String name) { public CompletionTest_ArgumentType_Prefix2(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724 // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724
// and https://bugs.eclipse.org/bugs/show_bug.cgi?id=88787
setExpectFailure(109724); setExpectFailure(109724);
} }

View file

@ -36,8 +36,8 @@ public class CompletionTest_ClassReference_NoPrefix extends CompletionProposals
public CompletionTest_ClassReference_NoPrefix(String name) { public CompletionTest_ClassReference_NoPrefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
setExpectFailure(151207); setExpectFailure(169860);
} }
public static Test suite() { public static Test suite() {

View file

@ -30,22 +30,12 @@ public class CompletionTest_ClassReference_Prefix extends CompletionProposalsBa
private final String[] expectedResults = { private final String[] expectedResults = {
"aClass", //$NON-NLS-1$ "aClass", //$NON-NLS-1$
"anotherClass" //$NON-NLS-1$ "anotherClass" //$NON-NLS-1$
/* FIXME: Additional results which should not be there. Run with trace enabled to reproduce:
Result: aFirstEnum
Result: aFunction(void) bool
Result: aNamespace
Result: anEnumeration
Result: anotherFunction(void) void
Result: aSecondEnum
Result: aThirdEnum
Result: aVariable : int
*/
}; };
public CompletionTest_ClassReference_Prefix(String name) { public CompletionTest_ClassReference_Prefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=88787 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
setExpectFailure(88787); setExpectFailure(169860);
} }
public static Test suite() { public static Test suite() {

View file

@ -30,14 +30,15 @@ public class CompletionTest_ConstructorReference extends CompletionProposalsBas
private final String headerFileFullPath ="resources/contentassist/" + headerFileName; private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedPrefix = ""; private final String expectedPrefix = "";
private final String[] expectedResults = { private final String[] expectedResults = {
// missing proposals:
"xOtherClass(char*)", "xOtherClass(char*)",
"xOtherClass(int)" "xOtherClass(int)"
}; };
public CompletionTest_ConstructorReference(String name) { public CompletionTest_ConstructorReference(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207 // unknown failure
setExpectFailure(151207); setExpectFailure(77777);
} }
public static Test suite() { public static Test suite() {

View file

@ -29,13 +29,21 @@ public class CompletionTest_ExceptionReference_NoPrefix extends CompletionPropo
private final String headerFileFullPath ="resources/contentassist/" + headerFileName; private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedPrefix = ""; private final String expectedPrefix = "";
private final String[] expectedResults = { private final String[] expectedResults = {
"..." // TODO "AStruct",
"XStruct",
"aClass",
"aNamespace",
"anEnumeration",
"anotherClass",
"xEnumeration",
"xNamespace",
"xOtherClass"
}; };
public CompletionTest_ExceptionReference_NoPrefix(String name) { public CompletionTest_ExceptionReference_NoPrefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
setExpectFailure(151207); setExpectFailure(169860);
} }
public static Test suite() { public static Test suite() {

View file

@ -35,22 +35,11 @@ public class CompletionTest_ExceptionReference_Prefix extends CompletionProposa
"anEnumeration", "anEnumeration",
// missing proposal: // missing proposal:
"AStruct" "AStruct"
/* FIXME: Additional results which should not be there. Run with trace enabled to reproduce:
Result: aFirstEnum
Result: aFunction(void) bool
Result: anotherField : int
Result: anotherFunction(void) void
Result: anotherMethod(void) void
Result: aSecondEnum
Result: aThirdEnum
Result: aVariable : int
*/
}; };
public CompletionTest_ExceptionReference_Prefix(String name) { public CompletionTest_ExceptionReference_Prefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724 // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724
// and https://bugs.eclipse.org/bugs/show_bug.cgi?id=88787
setExpectFailure(109724); setExpectFailure(109724);
} }

View file

@ -26,13 +26,22 @@ public class CompletionTest_FieldType_NoPrefix extends CompletionProposalsBaseT
private final String headerFileFullPath ="resources/contentassist/" + headerFileName; private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedPrefix = ""; private final String expectedPrefix = "";
private final String[] expectedResults = { private final String[] expectedResults = {
"<aType>" // TODO "AStruct",
"XStruct",
"aClass",
"aNamespace",
"aThirdClass",
"anEnumeration",
"anotherClass",
"xEnumeration",
"xNamespace",
"xOtherClass"
}; };
public CompletionTest_FieldType_NoPrefix(String name) { public CompletionTest_FieldType_NoPrefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
setExpectFailure(151207); setExpectFailure(169860);
} }
public static Test suite() { public static Test suite() {

View file

@ -27,13 +27,22 @@ public class CompletionTest_FieldType_NoPrefix2 extends CompletionProposalsBase
private final String headerFileFullPath ="resources/contentassist/" + headerFileName; private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedPrefix = ""; private final String expectedPrefix = "";
private final String[] expectedResults = { private final String[] expectedResults = {
"<aType>" // TODO "AStruct",
"XStruct",
"aClass",
"aNamespace",
"aThirdClass",
"anEnumeration",
"anotherClass",
"xEnumeration",
"xNamespace",
"xOtherClass"
}; };
public CompletionTest_FieldType_NoPrefix2(String name) { public CompletionTest_FieldType_NoPrefix2(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
setExpectFailure(151207); setExpectFailure(169860);
} }
public static Test suite() { public static Test suite() {

View file

@ -32,20 +32,11 @@ public class CompletionTest_FieldType_Prefix extends CompletionProposalsBaseTes
"anEnumeration", "anEnumeration",
// missing proposal: // missing proposal:
"AStruct" "AStruct"
/* FIXME: Additional results which should not be returned. Run with tracing enabled to reproduce:
Result: aFirstEnum
Result: aFunction(void) bool
Result: anotherFunction(void) void
Result: aSecondEnum
Result: aThirdEnum
Result: aVariable : int
*/
}; };
public CompletionTest_FieldType_Prefix(String name) { public CompletionTest_FieldType_Prefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724 // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724
// and https://bugs.eclipse.org/bugs/show_bug.cgi?id=88787
setExpectFailure(109724); setExpectFailure(109724);
} }

View file

@ -27,15 +27,27 @@ public class CompletionTest_MacroRef_NoPrefix extends CompletionProposalsBaseTe
private final String headerFileFullPath ="resources/contentassist/" + headerFileName; private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedPrefix = ""; private final String expectedPrefix = "";
private final String[] expectedResults = { private final String[] expectedResults = {
// missing results:
"aMacro(x)", "aMacro(x)",
"Debug", "Debug",
"xMacro(x,y)" "xMacro(x,y)"
/* superfluous results:
AStruct
XStruct
aClass
aNamespace
anEnumeration
anotherClass
xEnumeration
xNamespace
xOtherClass
*/
}; };
public CompletionTest_MacroRef_NoPrefix(String name) { public CompletionTest_MacroRef_NoPrefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207 // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=171708
setExpectFailure(151207); setExpectFailure(171708);
} }
public static Test suite() { public static Test suite() {

View file

@ -27,13 +27,14 @@ public class CompletionTest_MacroRef_Prefix extends CompletionProposalsBaseTest
private final String headerFileFullPath ="resources/contentassist/" + headerFileName; private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedPrefix = "D"; private final String expectedPrefix = "D";
private final String[] expectedResults = { private final String[] expectedResults = {
// missing result:
"Debug" "Debug"
}; };
public CompletionTest_MacroRef_Prefix(String name) { public CompletionTest_MacroRef_Prefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207 // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=171708
setExpectFailure(151207); setExpectFailure(171708);
} }
public static Test suite() { public static Test suite() {

View file

@ -33,8 +33,8 @@ public class CompletionTest_NamespaceRef_NoPrefix extends CompletionProposalsBa
public CompletionTest_NamespaceRef_NoPrefix(String name) { public CompletionTest_NamespaceRef_NoPrefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
setExpectFailure(151207); setExpectFailure(169860);
} }
public static Test suite() { public static Test suite() {

View file

@ -29,13 +29,12 @@ public class CompletionTest_NamespaceRef_Prefix extends CompletionProposalsBase
private final String expectedPrefix = "a"; private final String expectedPrefix = "a";
private final String[] expectedResults = { private final String[] expectedResults = {
"aNamespace" "aNamespace"
/* FIXME: extra results */
}; };
public CompletionTest_NamespaceRef_Prefix(String name) { public CompletionTest_NamespaceRef_Prefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=88787 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
setExpectFailure(88787); setExpectFailure(169860);
} }
public static Test suite() { public static Test suite() {

View file

@ -32,13 +32,19 @@ public class CompletionTest_NewTypeReference_NoPrefix extends CompletionProposa
"anotherClass", "anotherClass",
"AStruct", "AStruct",
"xOtherClass", "xOtherClass",
"XStruct" "XStruct",
"aNamespace",
"xNamespace"
/* extra results:
anEnumeration
xEnumeration
*/
}; };
public CompletionTest_NewTypeReference_NoPrefix(String name) { public CompletionTest_NewTypeReference_NoPrefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207 // unknown problem
setExpectFailure(151207); setExpectFailure(77777);
} }
public static Test suite() { public static Test suite() {

View file

@ -30,23 +30,17 @@ public class CompletionTest_NewTypeReference_Prefix extends CompletionProposals
private final String[] expectedResults = { private final String[] expectedResults = {
"aClass", "aClass",
"anotherClass", "anotherClass",
"aNamespace",
// missing proposal: // missing proposal:
"AStruct" "AStruct"
/* FIXME: Additional results which should not be there. Run with trace enabled to reproduce: // extra proposal:
Result: aFirstEnum // anEnumeration
Result: aFunction(void) bool
Result: anotherField : int };
Result: anotherFunction(void) void
Result: anotherMethod(void) void
Result: aSecondEnum
Result: aThirdEnum
Result: aVariable : int
*/ };
public CompletionTest_NewTypeReference_Prefix(String name) { public CompletionTest_NewTypeReference_Prefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724 // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724
// and https://bugs.eclipse.org/bugs/show_bug.cgi?id=88787
setExpectFailure(109724); setExpectFailure(109724);
} }

View file

@ -27,19 +27,17 @@ public class CompletionTest_ScopedReference_NonCodeScope extends CompletionProp
private final String headerFileFullPath ="resources/contentassist/" + headerFileName; private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedPrefix = ""; private final String expectedPrefix = "";
private final String[] expectedResults = { private final String[] expectedResults = {
"Foo", "Foo(void) ",
"x : int",
"bar(void) void", "bar(void) void",
"fum(void) void" "fum(void) void",
// missing:
"x : int"
}; };
/* FIXME: Unexpected results; run with tracing to reproduce
Result: y : int
*/
public CompletionTest_ScopedReference_NonCodeScope(String name) { public CompletionTest_ScopedReference_NonCodeScope(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=88787 // unknown problem
setExpectFailure(88787); setExpectFailure(77777);
} }
public static Test suite() { public static Test suite() {

View file

@ -28,14 +28,38 @@ public class CompletionTest_SingleName_Method_NoPrefix extends CompletionPropos
//TODO Hoda - please update this constant with what it is supposed to be //TODO Hoda - please update this constant with what it is supposed to be
private final String[] expectedResults = { private final String[] expectedResults = {
"AStruct",
"XStruct",
"aClass",
"aFirstEnum",
"aFunction(void) bool",
"aNamespace",
"aSecondEnum",
"aThirdEnum",
"aVariable : int",
"anEnumeration",
"anotherClass",
"anotherField : int", "anotherField : int",
"anotherMethod() void" "anotherFunction(void) void",
"anotherMethod(void) void",
"xEnumeration",
"xFirstEnum",
"xFunction(void) bool",
"xNamespace",
"xOtherClass",
"xOtherFunction(void) void",
"xSecondEnum",
"xThirdEnum",
"xVariable : int",
"~anotherClass(void) "
// extra result
// "operator =(const anotherClass &) anotherClass &",
}; };
public CompletionTest_SingleName_Method_NoPrefix(String name) { public CompletionTest_SingleName_Method_NoPrefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
setExpectFailure(151207); setExpectFailure(169860);
} }
public static Test suite() { public static Test suite() {

View file

@ -26,46 +26,47 @@ public class CompletionTest_SingleName_NoPrefix extends CompletionProposalsBase
private final String headerFileFullPath ="resources/contentassist/" + headerFileName; private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedPrefix = ""; private final String expectedPrefix = "";
private final String[] expectedResults = { private final String[] expectedResults = {
"x : int" "x : int",
// "aVariable : int", "aVariable : int",
// "xVariable : int", "xVariable : int",
// "aFunction() bool", "aFunction(void) bool",
// "anotherFunction() void", "anotherFunction(void) void",
// "foo(int) void", "foo(int) void",
// "xFunction() bool", "xFunction(void) bool",
// "xOtherFunction() void", "xOtherFunction(void) void",
// "aClass", "aClass",
// "anotherClass", "anotherClass",
// "xOtherClass", "xOtherClass",
// "AStruct", "AStruct",
// "XStruct", "XStruct",
// "aNamespace", "aNamespace",
// "xNamespace", "xNamespace",
// "anEnumeration", "anEnumeration",
// "xEnumeration", "xEnumeration",
// "aFirstEnum", "aFirstEnum",
// "aSecondEnum", "aSecondEnum",
// "aThirdEnum", "aThirdEnum",
// "xFirstEnum", "xFirstEnum",
// "xSecondEnum", "xSecondEnum",
// "xThirdEnum", "xThirdEnum",
// "__cplusplus", // missing:
// "__DATE__", "__cplusplus",
// "__FILE__", "__DATE__",
// "__LINE__", "__FILE__",
// "__STDC__", "__LINE__",
// "__STDC_HOSTED__", "__STDC__",
// "__STDC_VERSION__", "__STDC_HOSTED__",
// "__TIME__", "__STDC_VERSION__",
// "AMacro(x)", "__TIME__",
// "DEBUG", "AMacro(x)",
// "XMacro(x,y)" "DEBUG",
"XMacro(x,y)"
}; };
public CompletionTest_SingleName_NoPrefix(String name) { public CompletionTest_SingleName_NoPrefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207 // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=171708
setExpectFailure(151207); setExpectFailure(171708);
} }
public static Test suite() { public static Test suite() {

View file

@ -25,11 +25,15 @@ public class CompletionTest_SingleName_Prefix extends CompletionProposalsBaseTe
private final String headerFileFullPath ="resources/contentassist/" + headerFileName; private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedPrefix = "AM"; private final String expectedPrefix = "AM";
private final String[] expectedResults = { private final String[] expectedResults = {
// missing results
"AMacro(x)" "AMacro(x)"
}; };
public CompletionTest_SingleName_Prefix(String name) { public CompletionTest_SingleName_Prefix(String name) {
super(name); super(name);
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=171708
// setExpectFailure(171708);
} }
public static Test suite() { public static Test suite() {

View file

@ -29,32 +29,12 @@ public class CompletionTest_TypeRef_NoPrefix extends CompletionProposalsBaseTes
private final String[] expectedResults = { private final String[] expectedResults = {
"aNamespace", "aNamespace",
"xNamespace" "xNamespace"
/* FIXME: Additional results which should not be there. Run with trace enabled to reproduce: };
Result: aClass
Result: aFirstEnum
Result: aFunction(void) bool
Result: anEnumeration
Result: anotherClass
Result: anotherFunction(void) void
Result: aSecondEnum
Result: AStruct
Result: aThirdEnum
Result: aVariable : int
Result: xEnumeration
Result: xFirstEnum
Result: xFunction(void) bool
Result: xOtherClass
Result: xOtherFunction(void) void
Result: xSecondEnum
Result: XStruct
Result: xThirdEnum
Result: xVariable : int
*/ };
public CompletionTest_TypeRef_NoPrefix(String name) { public CompletionTest_TypeRef_NoPrefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=88787 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
setExpectFailure(88787); setExpectFailure(169860);
} }
public static Test suite() { public static Test suite() {

View file

@ -29,22 +29,12 @@ public class CompletionTest_TypeRef_Prefix extends CompletionProposalsBaseTest{
private final String expectedPrefix = "a"; private final String expectedPrefix = "a";
private final String[] expectedResults = { private final String[] expectedResults = {
"aNamespace" "aNamespace"
/* FIXME: Additional results which should not be there. Run with trace enabled to reproduce: };
Result: aClass
Result: aFirstEnum
Result: aFunction(void) bool
Result: anEnumeration
Result: anotherClass
Result: anotherFunction(void) void
Result: aSecondEnum
Result: aThirdEnum
Result: aVariable : int
*/ };
public CompletionTest_TypeRef_Prefix(String name) { public CompletionTest_TypeRef_Prefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=88787 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
setExpectFailure(88787); setExpectFailure(169860);
} }
public static Test suite() { public static Test suite() {

View file

@ -27,19 +27,18 @@ public class CompletionTest_VariableType_NestedPrefix extends CompletionProposa
private final String headerFileFullPath ="resources/contentassist/" + headerFileName; private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedPrefix = ""; private final String expectedPrefix = "";
private final String[] expectedResults = { private final String[] expectedResults = {
"Foo", "Foo(void) ",
"DEF",
"bar(void) void", "bar(void) void",
"fum(void) void", "fum(void) void",
// missing:
"DEF",
"x : int" "x : int"
}; };
/* FIXME: Unexpected result. Rerun with tracing to reproduce
Result: y : int
*/
public CompletionTest_VariableType_NestedPrefix(String name) { public CompletionTest_VariableType_NestedPrefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=88787 // unknown problem
setExpectFailure(88787); setExpectFailure(77777);
} }
public static Test suite() { public static Test suite() {

View file

@ -38,8 +38,8 @@ public class CompletionTest_VariableType_NoPrefix extends CompletionProposalsBa
public CompletionTest_VariableType_NoPrefix(String name) { public CompletionTest_VariableType_NoPrefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=151207 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
setExpectFailure(151207); setExpectFailure(169860);
} }
public static Test suite() { public static Test suite() {

View file

@ -31,20 +31,11 @@ public class CompletionTest_VariableType_Prefix extends CompletionProposalsBase
"anEnumeration", "anEnumeration",
// missing proposal: // missing proposal:
"AStruct" "AStruct"
/* Superfluous proposals:
"aFirstEnum",
"aFunction(void) bool",
"aSecondEnum",
"aThirdEnum",
"aVariable : int",
"anotherFunction(void) void"
*/
}; };
public CompletionTest_VariableType_Prefix(String name) { public CompletionTest_VariableType_Prefix(String name) {
super(name); super(name);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724 // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724
// and https://bugs.eclipse.org/bugs/show_bug.cgi?id=88787
setExpectFailure(109724); setExpectFailure(109724);
} }