Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Camelon2004-01-28 04:00:32 +0000
committerJohn Camelon2004-01-28 04:00:32 +0000
commitebd53b2c6d3c41241e0c8d7de993edc1f52257d0 (patch)
tree40e1ee92788dd14f6cc0cd537293bf3a0f7a0551 /core/org.eclipse.cdt.ui.tests
parent069a0e8535cb3930bc7d8ba95cb1d1762eea6bae (diff)
downloadorg.eclipse.cdt-ebd53b2c6d3c41241e0c8d7de993edc1f52257d0.tar.gz
org.eclipse.cdt-ebd53b2c6d3c41241e0c8d7de993edc1f52257d0.tar.xz
org.eclipse.cdt-ebd53b2c6d3c41241e0c8d7de993edc1f52257d0.zip
org.eclipse.cdt.core
Refactored parser to allow for cleaner content assist implementation. Removed IASTCompletionNode.CompletionKind.STATEMENT_START as it is redundant. Fixed bug 50640 - Wrong completion kind when expecting an exception Fixed bug 50471 - Wrong completion kind after the "using" keyword Fixed bug 50621 - Wrong completion kind in a class declaration org.eclipse.cdt.core.tests Renamed ContextualParseTest to CompletionParseTest. Updated COMPLETION_PARSE clients to use SINGLE_NAME_REFERENCE rather than STATEMENT_START. org.eclipse.cdt.ui Updated COMPLETION_PARSE clients to use SINGLE_NAME_REFERENCE rather than STATEMENT_START. org.eclipse.cdt.ui.tests Updated COMPLETION_PARSE clients to use SINGLE_NAME_REFERENCE rather than STATEMENT_START. Renamed and updated CompletionTest_StatementStart_NoPrefix to CompletionTest_SingleName_Method_NoPrefix. Renamed and updated CompletionTest_StatementStart_Prefix to CompletionTest_SingleName_Method_Prefix. Renamed and updated CompletionFailedTest_ExceptionReference_NoPrefix_Bug50640 to CompletionTest_ExceptionReference_NoPrefix and moved to passed tests folder. Renamed and updated CompletionFailedTest_ExceptionReference_Prefix_Bug50640 to CompletionTest_ExceptionReference_Prefix and moved to passed tests folder. Renamed and updated CompletionFailedTest_NamespaceRef_NoPrefix_Bug50471 to CompletionTest_TypeRef_NoPrefix and moved to passed tests folder. Renamed and updated CompletionFailedTest_NamespaceRef_Prefix_Bug50471 to CompletionTest_TypeRef_Prefix and moved to passed tests folder. Renamed and updated CompletionFailedTest_ClassReference_Prefix_Bug50621 to CompletionTest_ClassReference_Prefix and moved to passed tests folder. Renamed and updated CompletionFailedTest_ClassReference_NoPrefix_Bug50621 to CompletionTest_ClassReference_NoPrefix and moved to passed tests folder.
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests')
-rw-r--r--core/org.eclipse.cdt.ui.tests/ChangeLog11
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java16
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionProposalsBaseTest.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_NoPrefix.java (renamed from core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ClassReference_NoPrefix_Bug50621.java)13
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_Prefix.java (renamed from core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ClassReference_Prefix_Bug50621.java)13
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_NoPrefix.java (renamed from core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ExceptionReference_NoPrefix_Bug50640.java)16
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_Prefix.java (renamed from core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ExceptionReference_Prefix_Bug50640.java)14
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_SingleName_Method_NoPrefix.java (renamed from core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_StatementStart_NoPrefix.java)13
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_SingleName_Method_Prefix.java (renamed from core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_StatementStart_Prefix.java)13
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_NoPrefix.java (renamed from core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_NamespaceRef_NoPrefix_Bug50471.java)14
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_Prefix.java (renamed from core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_NamespaceRef_Prefix_Bug50471.java)13
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ScopedReference_NoPrefix_Bug50152.java2
12 files changed, 76 insertions, 64 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/ChangeLog b/core/org.eclipse.cdt.ui.tests/ChangeLog
index b4fe2e355b..45bc107c97 100644
--- a/core/org.eclipse.cdt.ui.tests/ChangeLog
+++ b/core/org.eclipse.cdt.ui.tests/ChangeLog
@@ -1,3 +1,14 @@
+2004-01-27 John Camelon
+ Updated COMPLETION_PARSE clients to use SINGLE_NAME_REFERENCE rather than STATEMENT_START.
+ Renamed and updated CompletionTest_StatementStart_NoPrefix to CompletionTest_SingleName_Method_NoPrefix.
+ Renamed and updated CompletionTest_StatementStart_Prefix to CompletionTest_SingleName_Method_Prefix.
+ Renamed and updated CompletionFailedTest_ExceptionReference_NoPrefix_Bug50640 to CompletionTest_ExceptionReference_NoPrefix and moved to passed tests folder.
+ Renamed and updated CompletionFailedTest_ExceptionReference_Prefix_Bug50640 to CompletionTest_ExceptionReference_Prefix and moved to passed tests folder.
+ Renamed and updated CompletionFailedTest_NamespaceRef_NoPrefix_Bug50471 to CompletionTest_TypeRef_NoPrefix and moved to passed tests folder.
+ Renamed and updated CompletionFailedTest_NamespaceRef_Prefix_Bug50471 to CompletionTest_TypeRef_Prefix and moved to passed tests folder.
+ Renamed and updated CompletionFailedTest_ClassReference_Prefix_Bug50621 to CompletionTest_ClassReference_Prefix and moved to passed tests folder.
+ Renamed and updated CompletionFailedTest_ClassReference_NoPrefix_Bug50621 to CompletionTest_ClassReference_NoPrefix and moved to passed tests folder.
+
2004-01-27 Hoda Amer
More Completion JUnit tests.
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java
index f34a06ada8..0e54c6138f 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java
@@ -46,8 +46,8 @@ public class AutomatedSuite extends TestSuite {
addTest(CompletionTest_ArgumentType_NoPrefix2_Bug50642.suite());
addTest(CompletionTest_ArgumentType_Prefix_Bug50642.suite());
addTest(CompletionTest_ArgumentType_NoPrefix2_Bug50642.suite());
- addTest(CompletionTest_StatementStart_Prefix.suite());
- addTest(CompletionTest_StatementStart_NoPrefix.suite());
+ addTest(CompletionTest_SingleName_Method_Prefix.suite());
+ addTest(CompletionTest_SingleName_Method_NoPrefix.suite());
addTest(CompletionTest_SingleName_Prefix.suite());
addTest(CompletionTest_SingleName_Prefix2.suite());
addTest(CompletionTest_SingleName_NoPrefix.suite());
@@ -60,14 +60,14 @@ public class AutomatedSuite extends TestSuite {
// Failed Tests
addTest(CompletionFailedTest_ScopedReference_NoPrefix_Bug50152.suite());
addTest(CompletionFailedTest_ScopedReference_Prefix_Bug50152.suite());
- addTest(CompletionFailedTest_NamespaceRef_NoPrefix_Bug50471.suite());
- addTest(CompletionFailedTest_NamespaceRef_Prefix_Bug50471.suite());
+ addTest(CompletionTest_TypeRef_NoPrefix.suite());
+ addTest(CompletionTest_TypeRef_Prefix.suite());
addTest(CompletionFailedTest_MacroRef_NoPrefix_Bug50487.suite());
addTest(CompletionFailedTest_MacroRef_Prefix_Bug50487.suite());
- addTest(CompletionFailedTest_ClassReference_NoPrefix_Bug50621.suite());
- addTest(CompletionFailedTest_ClassReference_Prefix_Bug50621.suite());
- addTest(CompletionFailedTest_ExceptionReference_NoPrefix_Bug50640.suite());
- addTest(CompletionFailedTest_ExceptionReference_Prefix_Bug50640.suite());
+ addTest(CompletionTest_ClassReference_NoPrefix.suite());
+ addTest(CompletionTest_ClassReference_Prefix.suite());
+ addTest(CompletionTest_ExceptionReference_NoPrefix.suite());
+ addTest(CompletionTest_ExceptionReference_Prefix.suite());
addTest(CompletionFailedTest_NewTypeReference_NoPrefix_Bug50711.suite());
addTest(CompletionFailedTest_NewTypeReference_Prefix_Bug50711.suite());
}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionProposalsBaseTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionProposalsBaseTest.java
index 3643c4405a..3567cdf768 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionProposalsBaseTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionProposalsBaseTest.java
@@ -161,7 +161,7 @@ public abstract class CompletionProposalsBaseTest extends TestCase{
String[] expected = getExpectedResultsValues();
assertTrue(results.length >= expected.length);
- for (int i = 0; i<expected.length; i++){
+ for (int i = 0; i< expected.length; i++){
ICompletionProposal proposal = results[i];
String displayString = proposal.getDisplayString();
assertEquals(displayString, expected[i]);
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ClassReference_NoPrefix_Bug50621.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_NoPrefix.java
index 9b0ea08e9c..67181e5dd2 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ClassReference_NoPrefix_Bug50621.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_NoPrefix.java
@@ -8,13 +8,12 @@
* Contributors:
* IBM Rational Software - Initial API and implementation
***********************************************************************/
-package org.eclipse.cdt.ui.tests.text.contentassist.failedtests;
+package org.eclipse.cdt.ui.tests.text.contentassist;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
-import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
/**
* @author hamer
@@ -23,7 +22,7 @@ import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
* Bug#50621 :Wrong completion kind in a class declaration
*
*/
-public class CompletionFailedTest_ClassReference_NoPrefix_Bug50621 extends CompletionProposalsBaseTest{
+public class CompletionTest_ClassReference_NoPrefix extends CompletionProposalsBaseTest{
private final String fileName = "CompletionFailedTestStart8.h";
private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
@@ -31,7 +30,7 @@ public class CompletionFailedTest_ClassReference_NoPrefix_Bug50621 extends Comp
private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedScopeName = "ASTCompilationUnit";
private final String expectedContextName = "null";
- private final CompletionKind expectedKind = CompletionKind.USER_SPECIFIED_NAME; // sould be CompletionKind.CLASS_REFERENCE;
+ private final CompletionKind expectedKind = CompletionKind.CLASS_REFERENCE;
private final String expectedPrefix = "";
private final String[] expectedResults = {
// Should be
@@ -40,13 +39,13 @@ public class CompletionFailedTest_ClassReference_NoPrefix_Bug50621 extends Comp
// "xOtherClass"
};
- public CompletionFailedTest_ClassReference_NoPrefix_Bug50621(String name) {
+ public CompletionTest_ClassReference_NoPrefix(String name) {
super(name);
}
public static Test suite() {
- TestSuite suite= new TestSuite(CompletionFailedTest_ClassReference_NoPrefix_Bug50621.class.getName());
- suite.addTest(new CompletionFailedTest_ClassReference_NoPrefix_Bug50621("testCompletionProposals"));
+ TestSuite suite= new TestSuite(CompletionTest_ClassReference_NoPrefix.class.getName());
+ suite.addTest(new CompletionTest_ClassReference_NoPrefix("testCompletionProposals"));
return suite;
}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ClassReference_Prefix_Bug50621.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_Prefix.java
index c8f10518f1..abe6d7dbc8 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ClassReference_Prefix_Bug50621.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_Prefix.java
@@ -8,13 +8,12 @@
* Contributors:
* IBM Rational Software - Initial API and implementation
***********************************************************************/
-package org.eclipse.cdt.ui.tests.text.contentassist.failedtests;
+package org.eclipse.cdt.ui.tests.text.contentassist;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
-import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
/**
* @author hamer
@@ -23,7 +22,7 @@ import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
* Bug#50621 :Wrong completion kind in a class declaration
*
*/
-public class CompletionFailedTest_ClassReference_Prefix_Bug50621 extends CompletionProposalsBaseTest{
+public class CompletionTest_ClassReference_Prefix extends CompletionProposalsBaseTest{
private final String fileName = "CompletionFailedTestStart7.h";
private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
@@ -31,7 +30,7 @@ public class CompletionFailedTest_ClassReference_Prefix_Bug50621 extends Comple
private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedScopeName = "ASTCompilationUnit";
private final String expectedContextName = "null";
- private final CompletionKind expectedKind = CompletionKind.USER_SPECIFIED_NAME; // sould be CompletionKind.CLASS_REFERENCE;
+ private final CompletionKind expectedKind = CompletionKind.CLASS_REFERENCE;
private final String expectedPrefix = "a";
private final String[] expectedResults = {
// Should be
@@ -39,13 +38,13 @@ public class CompletionFailedTest_ClassReference_Prefix_Bug50621 extends Comple
// "anotherClass"
};
- public CompletionFailedTest_ClassReference_Prefix_Bug50621(String name) {
+ public CompletionTest_ClassReference_Prefix(String name) {
super(name);
}
public static Test suite() {
- TestSuite suite= new TestSuite(CompletionFailedTest_ClassReference_Prefix_Bug50621.class.getName());
- suite.addTest(new CompletionFailedTest_ClassReference_Prefix_Bug50621("testCompletionProposals"));
+ TestSuite suite= new TestSuite(CompletionTest_ClassReference_Prefix.class.getName());
+ suite.addTest(new CompletionTest_ClassReference_Prefix("testCompletionProposals"));
return suite;
}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ExceptionReference_NoPrefix_Bug50640.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_NoPrefix.java
index 27adb3c034..9d7f0fc0cd 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ExceptionReference_NoPrefix_Bug50640.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_NoPrefix.java
@@ -8,14 +8,13 @@
* Contributors:
* IBM Rational Software - Initial API and implementation
***********************************************************************/
-package org.eclipse.cdt.ui.tests.text.contentassist.failedtests;
+package org.eclipse.cdt.ui.tests.text.contentassist;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
-import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
/**
* @author hamer
@@ -24,17 +23,18 @@ import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
* Bug#50640 : Wrong completion kind when expecting an exception
*
*/
-public class CompletionFailedTest_ExceptionReference_NoPrefix_Bug50640 extends CompletionProposalsBaseTest{
+public class CompletionTest_ExceptionReference_NoPrefix extends CompletionProposalsBaseTest{
private final String fileName = "CompletionFailedTestStart10.cpp";
private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
private final String headerFileName = "CompletionTestStart.h";
private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
- private final String expectedScopeName = "ASTCodeScope"; // should be "ASTMethod";
+ private final String expectedScopeName = "ASTMethod";
private final String expectedContextName = "null";
- private final CompletionKind expectedKind = CompletionKind.STATEMENT_START; // should be CompletionKind.EXCEPTION_REFERENCE ;
+ private final CompletionKind expectedKind = CompletionKind.EXCEPTION_REFERENCE;
private final String expectedPrefix = "";
private final String[] expectedResults = {
+ //TODO Hoda is this right? namespaces should not be allowed, unless you mean for qualified type
// Should be
// "aClass",
// "anotherClass",
@@ -44,13 +44,13 @@ public class CompletionFailedTest_ExceptionReference_NoPrefix_Bug50640 extends
// "..."
};
- public CompletionFailedTest_ExceptionReference_NoPrefix_Bug50640(String name) {
+ public CompletionTest_ExceptionReference_NoPrefix(String name) {
super(name);
}
public static Test suite() {
- TestSuite suite= new TestSuite(CompletionFailedTest_ExceptionReference_NoPrefix_Bug50640.class.getName());
- suite.addTest(new CompletionFailedTest_ExceptionReference_NoPrefix_Bug50640("testCompletionProposals"));
+ TestSuite suite= new TestSuite(CompletionTest_ExceptionReference_NoPrefix.class.getName());
+ suite.addTest(new CompletionTest_ExceptionReference_NoPrefix("testCompletionProposals"));
return suite;
}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ExceptionReference_Prefix_Bug50640.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_Prefix.java
index 08e0b0795b..182c1cabf8 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ExceptionReference_Prefix_Bug50640.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_Prefix.java
@@ -8,14 +8,13 @@
* Contributors:
* IBM Rational Software - Initial API and implementation
***********************************************************************/
-package org.eclipse.cdt.ui.tests.text.contentassist.failedtests;
+package org.eclipse.cdt.ui.tests.text.contentassist;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
-import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
/**
* @author hamer
@@ -24,7 +23,7 @@ import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
* Bug#50640 : Wrong completion kind when expecting an exception
*
*/
-public class CompletionFailedTest_ExceptionReference_Prefix_Bug50640 extends CompletionProposalsBaseTest{
+public class CompletionTest_ExceptionReference_Prefix extends CompletionProposalsBaseTest{
private final String fileName = "CompletionFailedTestStart9.cpp";
private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
@@ -32,9 +31,10 @@ public class CompletionFailedTest_ExceptionReference_Prefix_Bug50640 extends Co
private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedScopeName = "ASTMethod";
private final String expectedContextName = "null";
- private final CompletionKind expectedKind = CompletionKind.SINGLE_NAME_REFERENCE; // should be CompletionKind.EXCEPTION_REFERENCE ;
+ private final CompletionKind expectedKind = CompletionKind.EXCEPTION_REFERENCE;
private final String expectedPrefix = "a";
private final String[] expectedResults = {
+ //TODO Hoda please validate/verify this list
// Should be
// "aClass",
// "anotherClass",
@@ -43,13 +43,13 @@ public class CompletionFailedTest_ExceptionReference_Prefix_Bug50640 extends Co
// "AStruct"
};
- public CompletionFailedTest_ExceptionReference_Prefix_Bug50640(String name) {
+ public CompletionTest_ExceptionReference_Prefix(String name) {
super(name);
}
public static Test suite() {
- TestSuite suite= new TestSuite(CompletionFailedTest_ExceptionReference_Prefix_Bug50640.class.getName());
- suite.addTest(new CompletionFailedTest_ExceptionReference_Prefix_Bug50640("testCompletionProposals"));
+ TestSuite suite= new TestSuite(CompletionTest_ExceptionReference_Prefix.class.getName());
+ suite.addTest(new CompletionTest_ExceptionReference_Prefix("testCompletionProposals"));
return suite;
}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_StatementStart_NoPrefix.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_SingleName_Method_NoPrefix.java
index 1bc0a5e56c..0cc657b6b4 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_StatementStart_NoPrefix.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_SingleName_Method_NoPrefix.java
@@ -21,27 +21,28 @@ import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
* Lookup.THIS
*
*/
-public class CompletionTest_StatementStart_NoPrefix extends CompletionProposalsBaseTest{
+public class CompletionTest_SingleName_Method_NoPrefix extends CompletionProposalsBaseTest{
private final String fileName = "CompletionTestStart5.cpp";
private final String fileFullPath ="resources/contentassist/" + fileName;
private final String headerFileName = "CompletionTestStart.h";
private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedScopeName = "ASTMethod";
private final String expectedContextName = "null";
- private final CompletionKind expectedKind = CompletionKind.STATEMENT_START;
+ private final CompletionKind expectedKind = CompletionKind.SINGLE_NAME_REFERENCE;
private final String expectedPrefix = "";
+
+ //TODO Hoda - please update this constant with what it is supposed to be
private final String[] expectedResults = {
"anotherField : int",
- "anotherMethod() void"
};
- public CompletionTest_StatementStart_NoPrefix(String name) {
+ public CompletionTest_SingleName_Method_NoPrefix(String name) {
super(name);
}
public static Test suite() {
- TestSuite suite= new TestSuite(CompletionTest_StatementStart_NoPrefix.class.getName());
- suite.addTest(new CompletionTest_StatementStart_NoPrefix("testCompletionProposals"));
+ TestSuite suite= new TestSuite(CompletionTest_SingleName_Method_NoPrefix.class.getName());
+ suite.addTest(new CompletionTest_SingleName_Method_NoPrefix("testCompletionProposals"));
return suite;
}
/* (non-Javadoc)
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_StatementStart_Prefix.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_SingleName_Method_Prefix.java
index 742099f34f..b5abc53a61 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_StatementStart_Prefix.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_SingleName_Method_Prefix.java
@@ -20,7 +20,7 @@ import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
* Testing statement start completion kind, with a prefix
*
*/
-public class CompletionTest_StatementStart_Prefix extends CompletionProposalsBaseTest{
+public class CompletionTest_SingleName_Method_Prefix extends CompletionProposalsBaseTest{
private final String fileName = "CompletionTestStart1.cpp";
private final String fileFullPath ="resources/contentassist/" + fileName;
@@ -28,7 +28,7 @@ public class CompletionTest_StatementStart_Prefix extends CompletionProposalsBa
private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedScopeName = "ASTMethod";
private final String expectedContextName = "null";
- private final CompletionKind expectedKind = CompletionKind.STATEMENT_START;
+ private final CompletionKind expectedKind = CompletionKind.SINGLE_NAME_REFERENCE;
private final String expectedPrefix = "a";
private final String[] expectedResults = {
"anotherField : int",
@@ -40,17 +40,20 @@ public class CompletionTest_StatementStart_Prefix extends CompletionProposalsBa
"anotherClass",
"aNamespace",
"anEnumeration",
+ "aFirstEnum",
+ "aSecondEnum",
+ "aThirdEnum",
"AStruct",
"AMacro(x)"
};
- public CompletionTest_StatementStart_Prefix(String name) {
+ public CompletionTest_SingleName_Method_Prefix(String name) {
super(name);
}
public static Test suite() {
- TestSuite suite= new TestSuite(CompletionTest_StatementStart_Prefix.class.getName());
- suite.addTest(new CompletionTest_StatementStart_Prefix("testCompletionProposals"));
+ TestSuite suite= new TestSuite(CompletionTest_SingleName_Method_Prefix.class.getName());
+ suite.addTest(new CompletionTest_SingleName_Method_Prefix("testCompletionProposals"));
return suite;
}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_NamespaceRef_NoPrefix_Bug50471.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_NoPrefix.java
index 4a1a30f537..f3788cdf22 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_NamespaceRef_NoPrefix_Bug50471.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_NoPrefix.java
@@ -8,12 +8,11 @@
* Contributors:
* IBM Rational Software - Initial API and implementation
***********************************************************************/
-package org.eclipse.cdt.ui.tests.text.contentassist.failedtests;
+package org.eclipse.cdt.ui.tests.text.contentassist;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
-import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
/**
* @author hamer
@@ -22,7 +21,7 @@ import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
* Bug#50471 : Wrong completion kind after the "using" keyword
*
*/
-public class CompletionFailedTest_NamespaceRef_NoPrefix_Bug50471 extends CompletionProposalsBaseTest{
+public class CompletionTest_TypeRef_NoPrefix extends CompletionProposalsBaseTest{
private final String fileName = "CompletionFailedTestStart3.cpp";
private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
@@ -30,21 +29,22 @@ public class CompletionFailedTest_NamespaceRef_NoPrefix_Bug50471 extends Comple
private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedScopeName = "ASTCompilationUnit";
private final String expectedContextName = "null";
- private final CompletionKind expectedKind = CompletionKind.VARIABLE_TYPE; // should be CompletionKind.NAMESPACE_REFERENCE;
+ private final CompletionKind expectedKind = CompletionKind.TYPE_REFERENCE;
private final String expectedPrefix = "";
private final String[] expectedResults = {
+ //TODO Hoda your test is wrong "using [ ]" --> type
// Should be
// "aNamespace",
// "xNamespace"
};
- public CompletionFailedTest_NamespaceRef_NoPrefix_Bug50471(String name) {
+ public CompletionTest_TypeRef_NoPrefix(String name) {
super(name);
}
public static Test suite() {
- TestSuite suite= new TestSuite(CompletionFailedTest_NamespaceRef_NoPrefix_Bug50471.class.getName());
- suite.addTest(new CompletionFailedTest_NamespaceRef_NoPrefix_Bug50471("testCompletionProposals"));
+ TestSuite suite= new TestSuite(CompletionTest_TypeRef_NoPrefix.class.getName());
+ suite.addTest(new CompletionTest_TypeRef_NoPrefix("testCompletionProposals"));
return suite;
}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_NamespaceRef_Prefix_Bug50471.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_Prefix.java
index 90d404d2ec..b4dbe92ae1 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_NamespaceRef_Prefix_Bug50471.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_Prefix.java
@@ -8,13 +8,12 @@
* Contributors:
* IBM Rational Software - Initial API and implementation
***********************************************************************/
-package org.eclipse.cdt.ui.tests.text.contentassist.failedtests;
+package org.eclipse.cdt.ui.tests.text.contentassist;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
-import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
/**
* @author hamer
@@ -23,7 +22,7 @@ import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
* Bug#50471 : Wrong completion kind after the "using" keyword
*
*/
-public class CompletionFailedTest_NamespaceRef_Prefix_Bug50471 extends CompletionProposalsBaseTest{
+public class CompletionTest_TypeRef_Prefix extends CompletionProposalsBaseTest{
private final String fileName = "CompletionFailedTestStart4.cpp";
private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
@@ -31,20 +30,20 @@ public class CompletionFailedTest_NamespaceRef_Prefix_Bug50471 extends Completi
private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedScopeName = "ASTCompilationUnit";
private final String expectedContextName = "null";
- private final CompletionKind expectedKind = CompletionKind.VARIABLE_TYPE; // should be CompletionKind.NAMESPACE_REFERENCE;
+ private final CompletionKind expectedKind = CompletionKind.TYPE_REFERENCE;
private final String expectedPrefix = "a";
private final String[] expectedResults = {
// Should be
// "aNamespace"
};
- public CompletionFailedTest_NamespaceRef_Prefix_Bug50471(String name) {
+ public CompletionTest_TypeRef_Prefix(String name) {
super(name);
}
public static Test suite() {
- TestSuite suite= new TestSuite(CompletionFailedTest_NamespaceRef_Prefix_Bug50471.class.getName());
- suite.addTest(new CompletionFailedTest_NamespaceRef_Prefix_Bug50471("testCompletionProposals"));
+ TestSuite suite= new TestSuite(CompletionTest_TypeRef_Prefix.class.getName());
+ suite.addTest(new CompletionTest_TypeRef_Prefix("testCompletionProposals"));
return suite;
}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ScopedReference_NoPrefix_Bug50152.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ScopedReference_NoPrefix_Bug50152.java
index 3273d2aea4..364bfb507f 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ScopedReference_NoPrefix_Bug50152.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ScopedReference_NoPrefix_Bug50152.java
@@ -31,7 +31,7 @@ public class CompletionFailedTest_ScopedReference_NoPrefix_Bug50152 extends Com
private final String expectedScopeName = "ASTMethod";
private final String expectedContextName = "null"; // should be "ASTNamespaceDefinition";
private final CompletionKind expectedKind = CompletionKind.SINGLE_NAME_REFERENCE; // should be CompletionKind.SCOPED_REFERENCE;
- private final String expectedPrefix = "::"; // should be "";
+ private final String expectedPrefix = "";
private final String[] expectedResults = {
// shoud be "aNamespaceFunction() void"
};

Back to the top