--- old/test/lib/testlibrary/jdk/testlibrary/Asserts.java 2019-01-29 10:58:27.977656870 +0800 +++ new/test/lib/testlibrary/jdk/testlibrary/Asserts.java 2019-01-29 10:58:27.790662350 +0800 @@ -408,6 +408,22 @@ } } + /** + * 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 > int compare(T lhs, T rhs, String msg) { assertNotNull(lhs, msg); assertNotNull(rhs, msg);