Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHoda Amer2004-01-29 15:03:26 +0000
committerHoda Amer2004-01-29 15:03:26 +0000
commit9c870f74bfb86c96c5a7a9c257092db09b7de8b7 (patch)
tree48d6188215aa2061c9881714b7e53e203033222c /core/org.eclipse.cdt.ui.tests
parent878174520e1b332d18fac3a2c035518de7246855 (diff)
downloadorg.eclipse.cdt-9c870f74bfb86c96c5a7a9c257092db09b7de8b7.tar.gz
org.eclipse.cdt-9c870f74bfb86c96c5a7a9c257092db09b7de8b7.tar.xz
org.eclipse.cdt-9c870f74bfb86c96c5a7a9c257092db09b7de8b7.zip
Content Assist Work: More JUnit tests
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests')
-rw-r--r--core/org.eclipse.cdt.ui.tests/ChangeLog4
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart.h3
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart20.h (renamed from core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart7.h)0
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart21.h (renamed from core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart8.h)0
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart22.cpp (renamed from core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart9.cpp)0
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart23.cpp (renamed from core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart10.cpp)0
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart24.cpp (renamed from core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart3.cpp)0
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart25.cpp (renamed from core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart4.cpp)0
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart26.cpp (renamed from core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart5.cpp)0
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart27.cpp (renamed from core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart6.cpp)0
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart28.cpp (renamed from core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart11.cpp)0
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart29.cpp (renamed from core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart12.cpp)0
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart30.cpp (renamed from core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart1.cpp)0
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart31.cpp (renamed from core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart2.cpp)0
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart32.cpp3
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart33.cpp3
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart34.cpp6
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart35.cpp5
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java20
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_NoPrefix.java12
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_Prefix.java9
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_NoPrefix.java13
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_Prefix.java16
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NamespaceRef_NoPrefix.java118
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NamespaceRef_Prefix.java118
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NewTypeReference_NoPrefix.java7
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NewTypeReference_Prefix.java15
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_NoPrefix.java6
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_Prefix.java6
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ConstructorReference_Bug50808.java124
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_FunctionReference_Bug50807.java122
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_MacroRef_NoPrefix_Bug50487.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_MacroRef_Prefix_Bug50487.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ScopedReference_NoPrefix_Bug50152.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ScopedReference_Prefix_Bug50152.java4
35 files changed, 561 insertions, 65 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/ChangeLog b/core/org.eclipse.cdt.ui.tests/ChangeLog
index 28f8f17412..30b9ed129e 100644
--- a/core/org.eclipse.cdt.ui.tests/ChangeLog
+++ b/core/org.eclipse.cdt.ui.tests/ChangeLog
@@ -1,3 +1,7 @@
+2004-01-29 Hoda Amer
+ Added two more tests, namely Function_Reference and Constructor_Reference.
+ Moved tests starts resources all to one directory.
+
2004-01-28 John Camelon
Updated and renamed CompletionFailedTest_NewTypeReference_NoPrefix_Bug50711 to CompletionTest_NewTypeReference_NoPrefix, moving it to the success tests directory.
Updated and renamed CompletionFailedTest_NewTypeReference_Prefix_Bug50711 to CompletionTest_NewTypeReference_Prefix, moving it to the success tests directory.
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart.h b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart.h
index df667d08a7..31c77dfd66 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart.h
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart.h
@@ -52,8 +52,11 @@ public:
class xOtherClass {
public:
+ xOtherClass(char*);
+ xOtherClass(int);
int xOtherField;
void xOtherMethod();
+ void xOtherMethod(int);
};
namespace aNamespace {
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart7.h b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart20.h
index c0dd03edf3..c0dd03edf3 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart7.h
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart20.h
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart8.h b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart21.h
index 142826ffde..142826ffde 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart8.h
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart21.h
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart9.cpp b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart22.cpp
index 721d0efbe9..721d0efbe9 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart9.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart22.cpp
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart10.cpp b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart23.cpp
index 5e2cbae78a..5e2cbae78a 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart10.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart23.cpp
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart3.cpp b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart24.cpp
index 1af4d33b20..1af4d33b20 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart3.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart24.cpp
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart4.cpp b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart25.cpp
index 6f1f93e398..6f1f93e398 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart4.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart25.cpp
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart5.cpp b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart26.cpp
index 5a09fa91ec..5a09fa91ec 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart5.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart26.cpp
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart6.cpp b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart27.cpp
index 4f474a2883..4f474a2883 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart6.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart27.cpp
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart11.cpp b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart28.cpp
index 6b50a7263f..6b50a7263f 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart11.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart28.cpp
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart12.cpp b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart29.cpp
index 7ee28ed7cc..7ee28ed7cc 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart12.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart29.cpp
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart1.cpp b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart30.cpp
index 9010ea4240..9010ea4240 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart1.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart30.cpp
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart2.cpp b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart31.cpp
index 63286f3bf6..63286f3bf6 100644
--- a/core/org.eclipse.cdt.ui.tests/resources/contentassist/failedtests/CompletionFailedTestStart2.cpp
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart31.cpp
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart32.cpp b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart32.cpp
new file mode 100644
index 0000000000..463a344645
--- /dev/null
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart32.cpp
@@ -0,0 +1,3 @@
+#include "CompletionTestStart.h"
+
+using namespace
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart33.cpp b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart33.cpp
new file mode 100644
index 0000000000..f6fd9f0e9d
--- /dev/null
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart33.cpp
@@ -0,0 +1,3 @@
+#include "CompletionTestStart.h"
+
+using namespace a
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart34.cpp b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart34.cpp
new file mode 100644
index 0000000000..260938d2ca
--- /dev/null
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart34.cpp
@@ -0,0 +1,6 @@
+#include "CompletionTestStart.h"
+
+int anotherClass::anotherMethod(){
+ xOtherClass c;
+ c.xOtherMethod (
+}
diff --git a/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart35.cpp b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart35.cpp
new file mode 100644
index 0000000000..c30d27fa82
--- /dev/null
+++ b/core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart35.cpp
@@ -0,0 +1,5 @@
+#include "CompletionTestStart.h"
+
+int anotherClass::anotherMethod(){
+ xOtherClass* a = new xOtherClass (
+}
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 fac1173e26..f0ff1a2963 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
@@ -56,20 +56,24 @@ public class AutomatedSuite extends TestSuite {
addTest(CompletionTest_MemberReference_Arrow_Prefix.suite());
addTest(CompletionTest_MemberReference_Arrow_Prefix2.suite());
addTest(CompletionTest_MemberReference_Arrow_NoPrefix.suite());
-
- // Failed Tests
- addTest(CompletionFailedTest_ScopedReference_NoPrefix_Bug50152.suite());
- addTest(CompletionFailedTest_ScopedReference_Prefix_Bug50152.suite());
+ addTest(CompletionTest_NamespaceRef_Prefix.suite());
+ addTest(CompletionTest_NamespaceRef_NoPrefix.suite());
addTest(CompletionTest_TypeRef_NoPrefix.suite());
addTest(CompletionTest_TypeRef_Prefix.suite());
- addTest(CompletionFailedTest_MacroRef_NoPrefix_Bug50487.suite());
- addTest(CompletionFailedTest_MacroRef_Prefix_Bug50487.suite());
addTest(CompletionTest_ClassReference_NoPrefix.suite());
addTest(CompletionTest_ClassReference_Prefix.suite());
- addTest(CompletionTest_ExceptionReference_NoPrefix.suite());
- addTest(CompletionTest_ExceptionReference_Prefix.suite());
addTest(CompletionTest_NewTypeReference_NoPrefix.suite());
addTest(CompletionTest_NewTypeReference_Prefix.suite());
+ addTest(CompletionTest_ExceptionReference_NoPrefix.suite());
+ addTest(CompletionTest_ExceptionReference_Prefix.suite());
+
+ // Failed Tests
+ addTest(CompletionFailedTest_ScopedReference_NoPrefix_Bug50152.suite());
+ addTest(CompletionFailedTest_ScopedReference_Prefix_Bug50152.suite());
+ addTest(CompletionFailedTest_MacroRef_NoPrefix_Bug50487.suite());
+ addTest(CompletionFailedTest_MacroRef_Prefix_Bug50487.suite());
+ addTest(CompletionFailedTest_FunctionReference_Bug50807.suite());
+ addTest(CompletionFailedTest_ConstructorReference_Bug50808.suite());
}
}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_NoPrefix.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_NoPrefix.java
index 67181e5dd2..9dd73b2f93 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_NoPrefix.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_NoPrefix.java
@@ -24,8 +24,8 @@ import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
*/
public class CompletionTest_ClassReference_NoPrefix extends CompletionProposalsBaseTest{
- private final String fileName = "CompletionFailedTestStart8.h";
- private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
+ private final String fileName = "CompletionTestStart21.h";
+ private final String fileFullPath ="resources/contentassist/" + fileName;
private final String headerFileName = "CompletionTestStart.h";
private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedScopeName = "ASTCompilationUnit";
@@ -33,10 +33,10 @@ public class CompletionTest_ClassReference_NoPrefix extends CompletionProposals
private final CompletionKind expectedKind = CompletionKind.CLASS_REFERENCE;
private final String expectedPrefix = "";
private final String[] expectedResults = {
-// Should be
-// "aClass",
-// "anotherClass",
-// "xOtherClass"
+ "aClass",
+ "anotherClass",
+ "ClassA",
+ "xOtherClass"
};
public CompletionTest_ClassReference_NoPrefix(String name) {
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_Prefix.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_Prefix.java
index abe6d7dbc8..27d98358ea 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_Prefix.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ClassReference_Prefix.java
@@ -24,8 +24,8 @@ import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
*/
public class CompletionTest_ClassReference_Prefix extends CompletionProposalsBaseTest{
- private final String fileName = "CompletionFailedTestStart7.h";
- private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
+ private final String fileName = "CompletionTestStart20.h";
+ private final String fileFullPath ="resources/contentassist/" + fileName;
private final String headerFileName = "CompletionTestStart.h";
private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
private final String expectedScopeName = "ASTCompilationUnit";
@@ -33,9 +33,8 @@ public class CompletionTest_ClassReference_Prefix extends CompletionProposalsBa
private final CompletionKind expectedKind = CompletionKind.CLASS_REFERENCE;
private final String expectedPrefix = "a";
private final String[] expectedResults = {
-// Should be
-// "aClass",
-// "anotherClass"
+ "aClass",
+ "anotherClass"
};
public CompletionTest_ClassReference_Prefix(String name) {
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_NoPrefix.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_NoPrefix.java
index 9d7f0fc0cd..4601fc55ab 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_NoPrefix.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_NoPrefix.java
@@ -25,8 +25,8 @@ import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
*/
public class CompletionTest_ExceptionReference_NoPrefix extends CompletionProposalsBaseTest{
- private final String fileName = "CompletionFailedTestStart10.cpp";
- private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
+ private final String fileName = "CompletionTestStart23.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";
@@ -34,14 +34,7 @@ public class CompletionTest_ExceptionReference_NoPrefix extends CompletionPropo
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",
-// "aNamespace",
-// "anEnumeration",
-// "AStruct",
-// "..."
+ "..."
};
public CompletionTest_ExceptionReference_NoPrefix(String name) {
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_Prefix.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_Prefix.java
index 182c1cabf8..4e70838513 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_Prefix.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_ExceptionReference_Prefix.java
@@ -25,8 +25,8 @@ import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
*/
public class CompletionTest_ExceptionReference_Prefix extends CompletionProposalsBaseTest{
- private final String fileName = "CompletionFailedTestStart9.cpp";
- private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
+ private final String fileName = "CompletionTestStart22.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";
@@ -34,13 +34,11 @@ public class CompletionTest_ExceptionReference_Prefix extends CompletionProposa
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",
-// "aNamespace",
-// "anEnumeration",
-// "AStruct"
+ "aClass",
+ "anotherClass",
+ "aNamespace",
+ "anEnumeration",
+ "AStruct"
};
public CompletionTest_ExceptionReference_Prefix(String name) {
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NamespaceRef_NoPrefix.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NamespaceRef_NoPrefix.java
new file mode 100644
index 0000000000..e21ec6212f
--- /dev/null
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NamespaceRef_NoPrefix.java
@@ -0,0 +1,118 @@
+/**********************************************************************
+ * Copyright (c) 2004 Rational Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v0.5
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v05.html
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+***********************************************************************/
+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;
+
+/**
+ * @author hamer
+ *
+ * Testing Namespace_Reference, with no prefix
+ * Bug#50471 : Wrong completion kind after the "using" keyword
+ *
+ */
+public class CompletionTest_NamespaceRef_NoPrefix extends CompletionProposalsBaseTest{
+
+ private final String fileName = "CompletionTestStart32.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 = "ASTCompilationUnit";
+ private final String expectedContextName = "null";
+ private final CompletionKind expectedKind = CompletionKind.NAMESPACE_REFERENCE;
+ private final String expectedPrefix = "";
+ private final String[] expectedResults = {
+ "aNamespace",
+ "xNamespace"
+ };
+
+ public CompletionTest_NamespaceRef_NoPrefix(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ TestSuite suite= new TestSuite(CompletionTest_NamespaceRef_NoPrefix.class.getName());
+ suite.addTest(new CompletionTest_NamespaceRef_NoPrefix("testCompletionProposals"));
+ return suite;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+ */
+ protected int getCompletionPosition() {
+ return getBuffer().indexOf("namespace ") + 10;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedScope()
+ */
+ protected String getExpectedScopeClassName() {
+ return expectedScopeName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedContext()
+ */
+ protected String getExpectedContextClassName() {
+ return expectedContextName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedKind()
+ */
+ protected CompletionKind getExpectedKind() {
+ return expectedKind;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+ */
+ protected String getExpectedPrefix() {
+ return expectedPrefix;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+ */
+ protected String[] getExpectedResultsValues() {
+ return expectedResults;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+ */
+ protected String getFileName() {
+ return fileName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+ */
+ protected String getFileFullPath() {
+ return fileFullPath;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+ */
+ protected String getHeaderFileFullPath() {
+ return headerFileFullPath;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+ */
+ protected String getHeaderFileName() {
+ return headerFileName;
+ }
+
+}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NamespaceRef_Prefix.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NamespaceRef_Prefix.java
new file mode 100644
index 0000000000..fd3a65f709
--- /dev/null
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NamespaceRef_Prefix.java
@@ -0,0 +1,118 @@
+/**********************************************************************
+ * Copyright (c) 2004 Rational Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v0.5
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v05.html
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+***********************************************************************/
+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;
+
+/**
+ * @author hamer
+ *
+ * Testing Namespace_Reference, with prefix
+ * Bug#50471 : Wrong completion kind after the "using" keyword
+ *
+ */
+public class CompletionTest_NamespaceRef_Prefix extends CompletionProposalsBaseTest{
+
+ private final String fileName = "CompletionTestStart33.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 = "ASTCompilationUnit";
+ private final String expectedContextName = "null";
+ private final CompletionKind expectedKind = CompletionKind.NAMESPACE_REFERENCE;
+ private final String expectedPrefix = "a";
+ private final String[] expectedResults = {
+ "aNamespace"
+ };
+
+ public CompletionTest_NamespaceRef_Prefix(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ TestSuite suite= new TestSuite(CompletionTest_NamespaceRef_Prefix.class.getName());
+ suite.addTest(new CompletionTest_NamespaceRef_Prefix("testCompletionProposals"));
+ return suite;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+ */
+ protected int getCompletionPosition() {
+ return getBuffer().indexOf("namespace a ") + 11;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedScope()
+ */
+ protected String getExpectedScopeClassName() {
+ return expectedScopeName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedContext()
+ */
+ protected String getExpectedContextClassName() {
+ return expectedContextName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedKind()
+ */
+ protected CompletionKind getExpectedKind() {
+ return expectedKind;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+ */
+ protected String getExpectedPrefix() {
+ return expectedPrefix;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+ */
+ protected String[] getExpectedResultsValues() {
+ return expectedResults;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+ */
+ protected String getFileName() {
+ return fileName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+ */
+ protected String getFileFullPath() {
+ return fileFullPath;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+ */
+ protected String getHeaderFileFullPath() {
+ return headerFileFullPath;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+ */
+ protected String getHeaderFileName() {
+ return headerFileName;
+ }
+
+}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NewTypeReference_NoPrefix.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NewTypeReference_NoPrefix.java
index 24a93dc2de..98aed75543 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NewTypeReference_NoPrefix.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NewTypeReference_NoPrefix.java
@@ -24,8 +24,8 @@ import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
*/
public class CompletionTest_NewTypeReference_NoPrefix extends CompletionProposalsBaseTest{
- private final String fileName = "CompletionFailedTestStart12.cpp";
- private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
+ private final String fileName = "CompletionTestStart29.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";
@@ -33,9 +33,6 @@ public class CompletionTest_NewTypeReference_NoPrefix extends CompletionProposa
private final CompletionKind expectedKind = CompletionKind.NEW_TYPE_REFERENCE;
private final String expectedPrefix = "";
private final String[] expectedResults = {
- //TODO - Hoda please look into why these results do not resolve
- // should be
-// "aClass"
};
public CompletionTest_NewTypeReference_NoPrefix(String name) {
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NewTypeReference_Prefix.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NewTypeReference_Prefix.java
index 46b9f6ec8b..25403bf91b 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NewTypeReference_Prefix.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_NewTypeReference_Prefix.java
@@ -24,8 +24,8 @@ import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
*/
public class CompletionTest_NewTypeReference_Prefix extends CompletionProposalsBaseTest{
- private final String fileName = "CompletionFailedTestStart11.cpp";
- private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
+ private final String fileName = "CompletionTestStart28.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";
@@ -33,12 +33,11 @@ public class CompletionTest_NewTypeReference_Prefix extends CompletionProposals
private final CompletionKind expectedKind = CompletionKind.NEW_TYPE_REFERENCE;
private final String expectedPrefix = "a";
private final String[] expectedResults = {
-// Should be
-// "aClass",
-// "anotherClass",
-// "aNamespace",
-// "anEnumeration",
-// "AStruct"
+ "aClass",
+ "anotherClass",
+ "aNamespace",
+ "anEnumeration",
+ "AStruct"
};
public CompletionTest_NewTypeReference_Prefix(String name) {
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_NoPrefix.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_NoPrefix.java
index f3788cdf22..f766ffe008 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_NoPrefix.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_NoPrefix.java
@@ -17,14 +17,14 @@ import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
/**
* @author hamer
*
- * Testing Namespace_Reference, with no prefix
+ * Testing Type_Reference, with no prefix
* Bug#50471 : Wrong completion kind after the "using" keyword
*
*/
public class CompletionTest_TypeRef_NoPrefix extends CompletionProposalsBaseTest{
- private final String fileName = "CompletionFailedTestStart3.cpp";
- private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
+ private final String fileName = "CompletionTestStart24.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 = "ASTCompilationUnit";
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_Prefix.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_Prefix.java
index b4dbe92ae1..123b7712ed 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_Prefix.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_TypeRef_Prefix.java
@@ -18,14 +18,14 @@ import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
/**
* @author hamer
*
- * Testing Namespace_Reference, with prefix
+ * Testing Type_Reference, with prefix
* Bug#50471 : Wrong completion kind after the "using" keyword
*
*/
public class CompletionTest_TypeRef_Prefix extends CompletionProposalsBaseTest{
- private final String fileName = "CompletionFailedTestStart4.cpp";
- private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
+ private final String fileName = "CompletionTestStart25.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 = "ASTCompilationUnit";
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ConstructorReference_Bug50808.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ConstructorReference_Bug50808.java
new file mode 100644
index 0000000000..76eb19c39b
--- /dev/null
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ConstructorReference_Bug50808.java
@@ -0,0 +1,124 @@
+/**********************************************************************
+ * Copyright (c) 2004 Rational Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v0.5
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v05.html
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+***********************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist.failedtests;
+
+
+
+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
+ *
+ * Testing Constructor_Reference
+ * Bug#
+ *
+ */
+public class CompletionFailedTest_ConstructorReference_Bug50808 extends CompletionProposalsBaseTest{
+
+ private final String fileName = "CompletionTestStart35.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"; // should be "ASTClassSpecifier"
+ private final CompletionKind expectedKind = CompletionKind.NEW_TYPE_REFERENCE; // should be CompletionKind.CONSTRUCTOR_REFERENCE;
+ private final String expectedPrefix = "";
+ private final String[] expectedResults = {
+ // should be
+ // "xOtherClass(char*)",
+ // "xOtherClass(int)"
+ };
+
+ public CompletionFailedTest_ConstructorReference_Bug50808(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ TestSuite suite= new TestSuite(CompletionFailedTest_ConstructorReference_Bug50808.class.getName());
+ suite.addTest(new CompletionFailedTest_ConstructorReference_Bug50808("testCompletionProposals"));
+ return suite;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+ */
+ protected int getCompletionPosition() {
+ return getBuffer().indexOf("( ") + 2;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedScope()
+ */
+ protected String getExpectedScopeClassName() {
+ return expectedScopeName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedContext()
+ */
+ protected String getExpectedContextClassName() {
+ return expectedContextName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedKind()
+ */
+ protected CompletionKind getExpectedKind() {
+ return expectedKind;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+ */
+ protected String getExpectedPrefix() {
+ return expectedPrefix;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+ */
+ protected String[] getExpectedResultsValues() {
+ return expectedResults;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+ */
+ protected String getFileName() {
+ return fileName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+ */
+ protected String getFileFullPath() {
+ return fileFullPath;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+ */
+ protected String getHeaderFileFullPath() {
+ return headerFileFullPath;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+ */
+ protected String getHeaderFileName() {
+ return headerFileName;
+ }
+
+}
+
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_FunctionReference_Bug50807.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_FunctionReference_Bug50807.java
new file mode 100644
index 0000000000..dff5e6014a
--- /dev/null
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_FunctionReference_Bug50807.java
@@ -0,0 +1,122 @@
+/**********************************************************************
+ * Copyright (c) 2004 Rational Software Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v0.5
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v05.html
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+***********************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist.failedtests;
+
+
+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
+ *
+ * Testing Function_Reference
+ * Bug#
+ *
+ */
+public class CompletionFailedTest_FunctionReference_Bug50807 extends CompletionProposalsBaseTest{
+
+ private final String fileName = "CompletionTestStart34.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"; // either the context or the prefix should be meaningful "ASTMethod"
+ private final CompletionKind expectedKind = CompletionKind.SINGLE_NAME_REFERENCE; // should be CompletionKind.FUNCTION_REFERENCE;
+ private final String expectedPrefix = ""; // should be "xAClassMethod"
+ private final String[] expectedResults = {
+ // should be
+ // "xOtherMethod() void",
+ // "xOtherMethod(int) void"
+ };
+
+ public CompletionFailedTest_FunctionReference_Bug50807(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ TestSuite suite= new TestSuite(CompletionFailedTest_FunctionReference_Bug50807.class.getName());
+ suite.addTest(new CompletionFailedTest_FunctionReference_Bug50807("testCompletionProposals"));
+ return suite;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+ */
+ protected int getCompletionPosition() {
+ return getBuffer().indexOf("( ") + 2;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedScope()
+ */
+ protected String getExpectedScopeClassName() {
+ return expectedScopeName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedContext()
+ */
+ protected String getExpectedContextClassName() {
+ return expectedContextName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedKind()
+ */
+ protected CompletionKind getExpectedKind() {
+ return expectedKind;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+ */
+ protected String getExpectedPrefix() {
+ return expectedPrefix;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+ */
+ protected String[] getExpectedResultsValues() {
+ return expectedResults;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+ */
+ protected String getFileName() {
+ return fileName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+ */
+ protected String getFileFullPath() {
+ return fileFullPath;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+ */
+ protected String getHeaderFileFullPath() {
+ return headerFileFullPath;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+ */
+ protected String getHeaderFileName() {
+ return headerFileName;
+ }
+
+}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_MacroRef_NoPrefix_Bug50487.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_MacroRef_NoPrefix_Bug50487.java
index 2b8491af7b..bc1edd9776 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_MacroRef_NoPrefix_Bug50487.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_MacroRef_NoPrefix_Bug50487.java
@@ -24,8 +24,8 @@ import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
*/
public class CompletionFailedTest_MacroRef_NoPrefix_Bug50487 extends CompletionProposalsBaseTest{
- private final String fileName = "CompletionFailedTestStart5.cpp";
- private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
+ private final String fileName = "CompletionTestStart26.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 = "ASTCompilationUnit";
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_MacroRef_Prefix_Bug50487.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_MacroRef_Prefix_Bug50487.java
index 5ac2ad6e2d..3829a363f3 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_MacroRef_Prefix_Bug50487.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_MacroRef_Prefix_Bug50487.java
@@ -24,8 +24,8 @@ import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
*/
public class CompletionFailedTest_MacroRef_Prefix_Bug50487 extends CompletionProposalsBaseTest{
- private final String fileName = "CompletionFailedTestStart6.cpp";
- private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
+ private final String fileName = "CompletionTestStart27.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 = "ASTCompilationUnit";
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 364bfb507f..389a3f8a83 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
@@ -24,8 +24,8 @@ import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
*/
public class CompletionFailedTest_ScopedReference_NoPrefix_Bug50152 extends CompletionProposalsBaseTest{
- private final String fileName = "CompletionFailedTestStart1.cpp";
- private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
+ private final String fileName = "CompletionTestStart30.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";
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ScopedReference_Prefix_Bug50152.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ScopedReference_Prefix_Bug50152.java
index 3632a06e45..46a1875bcd 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ScopedReference_Prefix_Bug50152.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_ScopedReference_Prefix_Bug50152.java
@@ -24,8 +24,8 @@ import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
*/
public class CompletionFailedTest_ScopedReference_Prefix_Bug50152 extends CompletionProposalsBaseTest{
- private final String fileName = "CompletionFailedTestStart2.cpp";
- private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
+ private final String fileName = "CompletionTestStart31.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";

Back to the top