< prev index next >

test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java

Print this page

 28 import java.lang.reflect.Method;
 29 import java.util.Arrays;
 30 import java.util.Collections;
 31 import java.util.EnumSet;
 32 import java.util.HashSet;
 33 import java.util.List;
 34 import java.util.Set;
 35 
 36 /**
 37  * @test
 38  * @summary Verify that for each group of mutually exclusive predicates defined
 39  *          in jdk.test.lib.Platform one and only one predicate
 40  *          evaluates to true.
 41  * @library /test/lib
 42  * @modules java.base/jdk.internal.misc
 43  *          java.management
 44  * @run main TestMutuallyExclusivePlatformPredicates
 45  */
 46 public class TestMutuallyExclusivePlatformPredicates {
 47     private static enum MethodGroup {
 48         ARCH("isAArch64", "isARM", "isPPC", "isS390x", "isX64", "isX86"),
 49         BITNESS("is32bit", "is64bit"),
 50         OS("isAix", "isLinux", "isOSX", "isWindows"),
 51         VM_TYPE("isClient", "isServer", "isMinimal", "isZero", "isEmbedded"),
 52         MODE("isInt", "isMixed", "isComp"),
 53         IGNORED("isEmulatedClient", "isDebugBuild", "isFastDebugBuild",
 54                 "isSlowDebugBuild", "hasSA", "isRoot", "isTieredSupported",
 55                 "areCustomLoadersSupportedForCDS", "isDefaultCDSArchiveSupported",
 56                 "isHardenedOSX");
 57 
 58         public final List<String> methodNames;
 59 
 60         private MethodGroup(String... methodNames) {
 61             this.methodNames = Collections.unmodifiableList(
 62                     Arrays.asList(methodNames));
 63         }
 64     }
 65 
 66     public static void main(String args[]) {
 67         EnumSet<MethodGroup> notIgnoredMethodGroups
 68                 = EnumSet.complementOf(EnumSet.of(MethodGroup.IGNORED));

 28 import java.lang.reflect.Method;
 29 import java.util.Arrays;
 30 import java.util.Collections;
 31 import java.util.EnumSet;
 32 import java.util.HashSet;
 33 import java.util.List;
 34 import java.util.Set;
 35 
 36 /**
 37  * @test
 38  * @summary Verify that for each group of mutually exclusive predicates defined
 39  *          in jdk.test.lib.Platform one and only one predicate
 40  *          evaluates to true.
 41  * @library /test/lib
 42  * @modules java.base/jdk.internal.misc
 43  *          java.management
 44  * @run main TestMutuallyExclusivePlatformPredicates
 45  */
 46 public class TestMutuallyExclusivePlatformPredicates {
 47     private static enum MethodGroup {
 48         ARCH("isAArch64", "isARM", "isRISCV64", "isPPC", "isS390x", "isX64", "isX86"),
 49         BITNESS("is32bit", "is64bit"),
 50         OS("isAix", "isLinux", "isOSX", "isWindows"),
 51         VM_TYPE("isClient", "isServer", "isMinimal", "isZero", "isEmbedded"),
 52         MODE("isInt", "isMixed", "isComp"),
 53         IGNORED("isEmulatedClient", "isDebugBuild", "isFastDebugBuild",
 54                 "isSlowDebugBuild", "hasSA", "isRoot", "isTieredSupported",
 55                 "areCustomLoadersSupportedForCDS", "isDefaultCDSArchiveSupported",
 56                 "isHardenedOSX");
 57 
 58         public final List<String> methodNames;
 59 
 60         private MethodGroup(String... methodNames) {
 61             this.methodNames = Collections.unmodifiableList(
 62                     Arrays.asList(methodNames));
 63         }
 64     }
 65 
 66     public static void main(String args[]) {
 67         EnumSet<MethodGroup> notIgnoredMethodGroups
 68                 = EnumSet.complementOf(EnumSet.of(MethodGroup.IGNORED));
< prev index next >