Repair our test utility runNegativeTestMatching(): do expect an error
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
index 1f29759..818dd72 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
@@ -2266,7 +2266,9 @@
// javac options
javacTestOptions /* javac test options */);
}
- private void runTest(
+//{ObjectTeams: made accessible to sub-classes:
+ protected void runTest(
+// SH}
// test directory preparation
boolean shouldFlushOutputDirectory,
String[] testFiles,
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/AbstractOTJLDTest.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/AbstractOTJLDTest.java
index 1cfbd06..48a0a4e 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/AbstractOTJLDTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/AbstractOTJLDTest.java
@@ -138,8 +138,26 @@
protected void runNegativeTestMatching(String[] testFiles, String expectedCompilerLog) {
this.errorMatching = true;
- // ensure expectingCompilerError is set, which runNegativeTest(String[],String) not always does
- super.runNegativeTest(testFiles, expectedCompilerLog, DEFAULT_TEST_OPTIONS);
+ runTest(
+ // test directory preparation
+ true /* flush output directory */,
+ testFiles /* test files */,
+ // compiler options
+ null /* no class libraries */,
+ null /* no custom options */,
+ false /* do not perform statements recovery */,
+ null /* no custom requestor */,
+ // compiler results
+ true /* expecting compiler errors */,
+ expectedCompilerLog /* expected compiler log */,
+ // runtime options
+ false /* do not force execution */,
+ null /* no vm arguments */,
+ // runtime results
+ null /* do not check output string */,
+ null /* do not check error string */,
+ // javac options
+ DEFAULT_TEST_OPTIONS /* javac test options */);
this.errorMatching = false;
}