From 7dee1fe51a9f32d4d5a4868fddddacad01302214 Mon Sep 17 00:00:00 2001 From: Denghui Dong Date: Fri, 17 Jul 2020 13:27:31 +0800 Subject: [PATCH] [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 --- .../com/oracle/java/testlibrary/Asserts.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/testlibrary/com/oracle/java/testlibrary/Asserts.java b/test/testlibrary/com/oracle/java/testlibrary/Asserts.java index 176e88354..da3f428ea 100644 --- a/test/testlibrary/com/oracle/java/testlibrary/Asserts.java +++ b/test/testlibrary/com/oracle/java/testlibrary/Asserts.java @@ -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 > int compare(T lhs, T rhs, String msg) { assertNotNull(lhs, msg); assertNotNull(rhs, msg); -- GitLab