From 45776c14c10651acb947f9b20995ba8afb8c131a Mon Sep 17 00:00:00 2001 From: Denghui Dong Date: Fri, 17 Jul 2020 13:37:21 +0800 Subject: [PATCH] [Misc] Fixes test failures after merge jdk8u262-ga Summary: added help methods to Asserts.java Test Plan: jdk/test Reviewed-by: kuaiwei, sanhong Issue: https://github.com/alibaba/dragonwell8/issues/108 --- .../lib/testlibrary/jdk/testlibrary/Asserts.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/lib/testlibrary/jdk/testlibrary/Asserts.java b/test/lib/testlibrary/jdk/testlibrary/Asserts.java index 794261edc..8720be1d6 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 > int compare(T lhs, T rhs, String msg) { assertNotNull(lhs, msg); assertNotNull(rhs, msg); -- GitLab