changeset 2616:c565b044f8c4

8044597: Request to update tools/javap/T4501661.java to add test for package option Reviewed-by: jjg
author kizune
date Wed, 03 Sep 2014 19:22:16 +0400
parents 73b1d870a886
children 9a41fce5a626
files test/tools/javap/T4501661.java
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/test/tools/javap/T4501661.java	Mon Sep 01 17:41:01 2014 +0100
+++ b/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)