diff --git a/test/lib/testlibrary/jdk/testlibrary/Asserts.java b/test/lib/testlibrary/jdk/testlibrary/Asserts.java index 794261edc593f4ece234b31354ba36cfa6564057..8720be1d647ccddf30ca4d555c1050110c1c79c1 100644 --- a/test/lib/testlibrary/jdk/testlibrary/Asserts.java +++ b/test/lib/testlibrary/jdk/testlibrary/Asserts.java @@ -408,6 +408,22 @@ public class Asserts { } } + /** + * Fails a test with the default message. + */ + public static void fail() { + error("Test failed"); + } + + /** + * Fails a test with the given message. + * + * @param msg A description of the failure. + */ + public static void fail(String msg) { + error(msg); + } + private static <T extends Comparable<T>> int compare(T lhs, T rhs, String msg) { assertNotNull(lhs, msg); assertNotNull(rhs, msg);