提交 7dee1fe5 编写于 作者: D Denghui Dong

[Misc] Fixes test failures after merge jdk8u262-ga

Summary: added help methods to Asserts.java

Test Plan: hotspot/test

Reviewed-by: kuaiwei, sanhong

Issue: https://github.com/alibaba/dragonwell8/issues/108
上级 80228a15
...@@ -436,6 +436,24 @@ public class Asserts { ...@@ -436,6 +436,24 @@ public class Asserts {
} }
} }
/**
* Fail the test directly
* @throws RuntimeException anyway.
*/
public static void fail() {
error("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) { private static <T extends Comparable<T>> int compare(T lhs, T rhs, String msg) {
assertNotNull(lhs, msg); assertNotNull(lhs, msg);
assertNotNull(rhs, msg); assertNotNull(rhs, msg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册