changeset 4474:ecda27ca1011

fix 2 failing tests after Module attribute changes
author jjg
date Tue, 22 Nov 2016 17:49:57 -0800
parents ec19be6d1e19
children ea87091ceefc
files test/tools/javac/classfiles/attributes/Module/ModuleTestBase.java test/tools/javac/modules/OpenModulesTest.java
diffstat 2 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/test/tools/javac/classfiles/attributes/Module/ModuleTestBase.java	Tue Nov 22 15:34:45 2016 -0800
+++ b/test/tools/javac/classfiles/attributes/Module/ModuleTestBase.java	Tue Nov 22 17:49:57 2016 -0800
@@ -87,7 +87,8 @@
         List<Pair<String, Integer>> actualRequires = new ArrayList<>();
         for (Module_attribute.RequiresEntry require : module.requires) {
             actualRequires.add(Pair.of(
-                    require.getRequires(constantPool), require.requires_flags));
+                    require.getRequires(constantPool).replace('/', '.'),
+                    require.requires_flags));
         }
         tr.checkContains(actualRequires, moduleDescriptor.requires, "Lists of requires don't match");
     }
@@ -103,7 +104,7 @@
                 tr.checkEquals(export.exports_to_count, expectedTo.size(), "Wrong amount of exports to");
                 List<String> actualTo = new ArrayList<>();
                 for (int toIdx : export.exports_to_index) {
-                    actualTo.add(constantPool.getUTF8Value(toIdx));
+                    actualTo.add(constantPool.getUTF8Value(toIdx).replace('/', '.'));
                 }
                 tr.checkContains(actualTo, expectedTo, "Lists of \"exports to\" don't match.");
             }
--- a/test/tools/javac/modules/OpenModulesTest.java	Tue Nov 22 15:34:45 2016 -0800
+++ b/test/tools/javac/modules/OpenModulesTest.java	Tue Nov 22 17:49:57 2016 -0800
@@ -73,8 +73,7 @@
 
         String decompiled = new JavapTask(tb)
                 .options("--system", "none", "-bootclasspath", "")
-                .classpath(m1Classes.toString())
-                .classes("module-info")
+                .classes(m1Classes.resolve("module-info.class").toString())
                 .run()
                 .writeAll()
                 .getOutput(OutputKind.DIRECT)
@@ -137,8 +136,7 @@
 
         String decompiled = new JavapTask(tb)
                 .options("--system", "none", "-bootclasspath", "")
-                .classpath(m1Classes.toString())
-                .classes("module-info")
+                .classes(m1Classes.resolve("module-info.class").toString())
                 .run()
                 .writeAll()
                 .getOutput(OutputKind.DIRECT)