8044597: Request to update tools/javap/T4501661.java to add test for package option
authorkizune
Wed, 03 Sep 2014 19:22:16 +0400
changeset 26388 6048554767c0
parent 26387 e3e933f2670b
child 26389 b389165f2c78
8044597: Request to update tools/javap/T4501661.java to add test for package option Reviewed-by: jjg
langtools/test/tools/javap/T4501661.java
--- a/langtools/test/tools/javap/T4501661.java	Mon Sep 01 17:41:01 2014 +0100
+++ b/langtools/test/tools/javap/T4501661.java	Wed Sep 03 19:22:16 2014 +0400
@@ -38,10 +38,12 @@
         File javaFile = writeTestFile();
         File classFile = compileTestFile(javaFile);
         boolean[] values = { false, true };
-        for (boolean priv: values) {
-            for (boolean prot: values) {
-                for (boolean publ: values) {
-                    test(priv, prot, publ, classFile);
+        for (boolean pack : values) {
+            for (boolean priv : values) {
+                for (boolean prot : values) {
+                    for (boolean publ : values) {
+                        test(pack, priv, prot, publ, classFile);
+                    }
                 }
             }
         }
@@ -50,8 +52,10 @@
             throw new Exception(errors + " errors found");
     }
 
-    void test(boolean priv, boolean prot, boolean publ, File classFile) {
+    void test(boolean pack, boolean priv, boolean prot, boolean publ, File classFile) {
         List<String> args = new ArrayList<String>();
+        if (pack)
+            args.add("-package");
         if (priv)
             args.add("-private");
         if (prot)