< prev index next >
test/lib/testlibrary/jdk/testlibrary/Asserts.java
Print this page
rev 13428 : jfr backport
*** 406,415 ****
--- 406,431 ----
if (!value) {
error(msg);
}
}
+ /**
+ * 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);
return lhs.compareTo(rhs);
}
< prev index next >