mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-30 04:43:27 +00:00
8044597: Request to update tools/javap/T4501661.java to add test for package option
Reviewed-by: jjg
This commit is contained in:
parent
ef0951db68
commit
f4e40eeff6
@ -38,10 +38,12 @@ public class T4501661 {
|
||||
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 @@ public class T4501661 {
|
||||
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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user