< prev index next >
test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java
Print this page
*** 19,30 ****
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! import com.oracle.java.testlibrary.Asserts;
! import com.oracle.java.testlibrary.Platform;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collections;
--- 19,30 ----
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! import jdk.test.lib.Asserts;
! import jdk.test.lib.Platform;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collections;
*** 34,44 ****
import java.util.Set;
/**
* @test
* @summary Verify that for each group of mutually exclusive predicates defined
! * in com.oracle.java.testlibrary.Platform one and only one predicate
* evaluates to true.
* @library /testlibrary
* @modules java.base/sun.misc
* java.management
* @run main TestMutuallyExclusivePlatformPredicates
--- 34,44 ----
import java.util.Set;
/**
* @test
* @summary Verify that for each group of mutually exclusive predicates defined
! * in jdk.test.lib.Platform one and only one predicate
* evaluates to true.
* @library /testlibrary
* @modules java.base/sun.misc
* java.management
* @run main TestMutuallyExclusivePlatformPredicates
*** 70,80 ****
TestMutuallyExclusivePlatformPredicates.verifyCoverage();
}
/**
* Verifies that one and only one predicate method defined in
! * {@link com.oracle.java.testlibrary.Platform}, whose name included into
* methodGroup will return {@code true}.
* @param methodGroup The group of methods that should be tested.
*/
private static void verifyPredicates(MethodGroup methodGroup) {
System.out.println("Verifying method group: " + methodGroup.name());
--- 70,80 ----
TestMutuallyExclusivePlatformPredicates.verifyCoverage();
}
/**
* Verifies that one and only one predicate method defined in
! * {@link jdk.test.lib.Platform}, whose name included into
* methodGroup will return {@code true}.
* @param methodGroup The group of methods that should be tested.
*/
private static void verifyPredicates(MethodGroup methodGroup) {
System.out.println("Verifying method group: " + methodGroup.name());
*** 89,99 ****
methodGroup.name(), truePredicatesCount));
}
/**
* Verifies that all predicates defined in
! * {@link com.oracle.java.testlibrary.Platform} were either tested or
* explicitly ignored.
*/
private static void verifyCoverage() {
Set<String> allMethods = new HashSet<>();
for (MethodGroup group : MethodGroup.values()) {
--- 89,99 ----
methodGroup.name(), truePredicatesCount));
}
/**
* Verifies that all predicates defined in
! * {@link jdk.test.lib.Platform} were either tested or
* explicitly ignored.
*/
private static void verifyCoverage() {
Set<String> allMethods = new HashSet<>();
for (MethodGroup group : MethodGroup.values()) {
*** 110,120 ****
}
}
/**
* Evaluates predicate method with name {@code name} defined in
! * {@link com.oracle.java.testlibrary.Platform}.
*
* @param name The name of a predicate to be evaluated.
* @return evaluated predicate's value.
* @throws java.lang.Error if predicate is not defined or could not be
* evaluated.
--- 110,120 ----
}
}
/**
* Evaluates predicate method with name {@code name} defined in
! * {@link jdk.test.lib.Platform}.
*
* @param name The name of a predicate to be evaluated.
* @return evaluated predicate's value.
* @throws java.lang.Error if predicate is not defined or could not be
* evaluated.
< prev index next >