Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2021-02-16 09:50:38 -0500
committerStephan Herrmann2021-02-16 09:52:42 -0500
commit4ffde08df16264cfbff159024893e456a508cde8 (patch)
tree2373d717ef3a63439e10c64a8dc3118fd282e1bb
parentdb0505ae83209e88f185623ebb5db1d077ff30f3 (diff)
downloadeclipse.jdt.core-I20210216-2020.tar.gz
eclipse.jdt.core-I20210216-2020.tar.xz
eclipse.jdt.core-I20210216-2020.zip
Bug 571194 - testBug571055_* fail on WindowsI20210216-2020I20210216-1800I20210216-1340
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractBatchCompilerTest.java7
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationBatchCompilerTest.java4
2 files changed, 9 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractBatchCompilerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractBatchCompilerTest.java
index 98b18132d5..cad3c2fb7e 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractBatchCompilerTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractBatchCompilerTest.java
@@ -604,6 +604,13 @@ public abstract class AbstractBatchCompilerTest extends AbstractRegressionTest {
&& (errCompareOK = semiNormalizedComparison(expectedErrOutputString,
errOutputString, outputDirNormalizer));
}
+ // test sanity of the test definition: did we forget to use "---OUTPUT_DIR_PLACEHOLDER---" instead of OUTPUT_DIR?
+ if (!outCompareOK) {
+ assertEquals("outputDirNormalizer should not affect expectedOutOutput", expectedOutOutputString, outputDirNormalizer.normalized(expectedOutOutputString));
+ }
+ if (!errCompareOK) {
+ assertEquals("outputDirNormalizer should not affect expectedErrOutput", expectedErrOutputString, outputDirNormalizer.normalized(expectedErrOutputString));
+ }
if (compileOK != shouldCompileOK || !compareOK) {
System.out.println(getClass().getName() + '#' + getName());
if (testFiles != null) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationBatchCompilerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationBatchCompilerTest.java
index 2a4158b899..5ee587e13b 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationBatchCompilerTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationBatchCompilerTest.java
@@ -1103,12 +1103,12 @@ public class NullAnnotationBatchCompilerTest extends AbstractBatchCompilerTest {
// expect eea-motivated problems in Test1 but no in FooImpl:
String expectedCompilerMessage =
"----------\n" +
- "1. ERROR in " + OUTPUT_DIR + File.separator + "test1" + File.separator + "Test1.java (at line 7)\n" +
+ "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---" + File.separator + "test1" + File.separator + "Test1.java (at line 7)\n" +
" String result = api.m(null);\n" +
" ^^^^\n" +
"Null type mismatch: required '@NonNull String' but the provided value is null\n" +
"----------\n" +
- "2. WARNING in " + OUTPUT_DIR + File.separator + "test1" + File.separator + "Test1.java (at line 8)\n" +
+ "2. WARNING in ---OUTPUT_DIR_PLACEHOLDER---" + File.separator + "test1" + File.separator + "Test1.java (at line 8)\n" +
" System.out.println(result.toUpperCase());\n" +
" ^^^^^^\n" +
"Potential null pointer access: The variable result may be null at this location\n" +

Back to the top