Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2010-05-05 19:25:12 -0400
committerStephan Herrmann2010-05-05 19:25:12 -0400
commite49b4bed58e6af8eb4799e95b0fdef12858ac379 (patch)
tree27544c2d4b3bb1e51efeeaf70a3201e74efd73cb /org.eclipse.jdt.core.tests.model
parent4fac782f0ac0a813cdccb7c77963fbeec82ef770 (diff)
downloadorg.eclipse.objectteams-e49b4bed58e6af8eb4799e95b0fdef12858ac379.tar.gz
org.eclipse.objectteams-e49b4bed58e6af8eb4799e95b0fdef12858ac379.tar.xz
org.eclipse.objectteams-e49b4bed58e6af8eb4799e95b0fdef12858ac379.zip
adjust a test that never ran at objectteams.org (?!?):
- since we don't detect unused import before analyze (which is skipped here) we trigger and expect a different warning now.
Diffstat (limited to 'org.eclipse.jdt.core.tests.model')
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java
index d49d63864..33d3114fb 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java
@@ -4387,8 +4387,14 @@ public void testFallthroughDiagnosis() throws CoreException, InterruptedExceptio
public void testIgnoreMethodBodies1() throws CoreException {
setWorkingCopyContents(
"package p1;\n" +
+//{ObjectTeams: we don't check imports before analyze (see CUD.resolve())
+/* orig:
"import p2.*;" +
"public class X {\n" +
+ */
+// trigger a different warning:
+ "public class X implements java.io.Serializable {\n" +
+// SH}
" public int foo() {\n" + // force an error by not returning
" int i = 0;\n" +
" }\n" +
@@ -4398,17 +4404,29 @@ public void testIgnoreMethodBodies1() throws CoreException {
assertProblems("Working copy should have problems:",
"----------\n" +
"1. WARNING in /Reconciler/src/p1/X.java (at line 2)\n"+
+//{ObjectTeams: expect different warning:
+/* orig:
" import p2.*;public class X {\n" +
" ^^\n" +
"The import p2 is never used\n"+
+ :giro */
+ " public class X implements java.io.Serializable {\n" +
+ " ^\n" +
+ "The serializable class X does not declare a static final serialVersionUID field of type long\n" +
+// SH}
"----------\n"
);
// statement declaring i should not be in the AST
assertASTNodeEquals(
"Unexpected participant ast",
"package p1;\n" +
+//{ObjectTeams: different AST (see above):
+/* orig:
"import p2.*;\n" +
"public class X {\n" +
+ :giro */
+ "public class X implements java.io.Serializable {\n" +
+// SH}
" public int foo(){\n" +
" }\n" +
"}\n",

Back to the top