diff options
author | Srikanth Sankaran | 2010-11-02 16:19:38 +0000 |
---|---|---|
committer | Srikanth Sankaran | 2010-11-02 16:19:38 +0000 |
commit | ead0ac8b76ebb49296393f52adae3ef70f089242 (patch) | |
tree | 84bf9c1167923fbeba5e004449fc419203584e5c /org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java | |
parent | c4fa4d272fd0c5fb7e1db44c8cef0ea47f3df504 (diff) | |
download | eclipse.jdt.core-ead0ac8b76ebb49296393f52adae3ef70f089242.tar.gz eclipse.jdt.core-ead0ac8b76ebb49296393f52adae3ef70f089242.tar.xz eclipse.jdt.core-ead0ac8b76ebb49296393f52adae3ef70f089242.zip |
HEAD - Fix for 186565
Diffstat (limited to 'org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java')
-rw-r--r-- | org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java index 3a257380a0..4eb33f4244 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java @@ -11963,4 +11963,60 @@ public void testInferenceIn15Project(){ // ensure 1.5 complains too new File(lib1Path).delete(); } } +// https://bugs.eclipse.org/bugs/show_bug.cgi?id=186565 Test interaction between 1.4 and 1.5 class files +public void test186565(){ + String outputDirName = OUTPUT_DIR + File.separator + "d", + metaInfDirName = outputDirName + File.separator + "META-INF", + jarFileName = outputDirName + File.separator + "classB15.jar"; + this.runConformTest( + new String[] { + "d/B.java", + "public class B<T> extends A<T> {\n" + + "}", + "d/A.java", + "public class A<T> {\n" + + "}", + }, + "\"" + outputDirName + "\"" + + " -1.5 -g -preserveAllLocals" + + " -d \"" + outputDirName + "\"", + "", + "", + true /* flush output directory */); + File outputDirectory = new File(outputDirName); + File metaInfDirectory = new File(metaInfDirName); + metaInfDirectory.mkdirs(); + try { + Util.createFile(metaInfDirName + File.separator + "MANIFEST.MF", + "Manifest-Version: 1.0\n" + + "Class-Path: ../d/classB15.jar\n"); + } catch (IOException e) { + fail("could not create manifest file"); + } + Util.delete(outputDirName + File.separator + "A.class"); + Util.delete(outputDirName + File.separator + "A.java"); + try { + Util.zip(outputDirectory, jarFileName); + } catch (IOException e) { + fail("could not create jar file"); + } + Util.delete(outputDirName + File.separator + "B.class"); + Util.delete(outputDirName + File.separator + "B.java"); + this.runConformTest( + new String[] { + "d/A.java", + "public class A {\n" + + "}", + "d/C.java", + "public class C extends B<String> {\n" + + "}", + }, + "\"" + outputDirName + "\"" + + " -1.5 -g -preserveAllLocals" + + " -cp \"" + jarFileName + "\"" + + " -d \"" + OUTPUT_DIR + "\"", + "", + "", + false /* do not flush output directory */); +} } |