public class GraalTest extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GraalTest.MultiCauseAssertionError |
Constructor and Description |
---|
GraalTest() |
Modifier and Type | Method and Description |
---|---|
protected void |
assertDeepEquals(Object expected,
Object actual)
Compares two given objects for equality.
|
protected void |
assertDeepEquals(String message,
Object expected,
Object actual)
Compares two given objects for equality.
|
protected void |
assertDeepEquals(String message,
Object expected,
Object actual,
double delta)
Compares two given values for equality, doing a recursive test if both values are arrays of
the same type.
|
protected void |
assertDeepEquals(String message,
Object expected,
Object actual,
int ulpsDelta)
Compares two given values for equality, doing a recursive test if both values are arrays of
the same type.
|
static void |
assertFalse(boolean condition)
Asserts that a condition is false.
|
static void |
assertFalse(boolean condition,
String message,
Object... objects)
Asserts that a condition is false.
|
static void |
assertFalse(String message,
boolean condition)
Asserts that a condition is false.
|
static void |
assertTrue(boolean condition)
Asserts that a condition is true.
|
static void |
assertTrue(boolean condition,
String message,
Object... objects)
Asserts that a condition is true.
|
static void |
assertTrue(String message,
boolean condition)
Asserts that a condition is true.
|
protected double |
equalFloatsOrDoublesDelta()
Gets the value used by
assertDeepEquals(Object, Object) and
assertDeepEquals(String, Object, Object) for the maximum delta between two doubles
or floats for which both numbers are still considered equal. |
static void |
fail(String message,
Object... objects)
Fails a test with the given message.
|
protected Method |
getMethod(Class<?> clazz,
String methodName) |
protected Method |
getMethod(Class<?> clazz,
String methodName,
Class<?>[] parameterTypes) |
protected Method |
getMethod(String methodName) |
protected int |
ulpsDelta() |
public GraalTest()
protected void assertDeepEquals(Object expected, Object actual)
expected
is an array.protected void assertDeepEquals(String message, Object expected, Object actual)
expected
is an array.message
- the identifying message for the AssertionError
protected void assertDeepEquals(String message, Object expected, Object actual, double delta)
message
- the identifying message for the AssertionError
delta
- the maximum delta between two doubles or floats for which both numbers are still
considered equal.protected void assertDeepEquals(String message, Object expected, Object actual, int ulpsDelta)
message
- the identifying message for the AssertionError
ulpsDelta
- the maximum allowed ulps difference between two doubles or floats for which
both numbers are still considered equal.protected double equalFloatsOrDoublesDelta()
assertDeepEquals(Object, Object)
and
assertDeepEquals(String, Object, Object)
for the maximum delta between two doubles
or floats for which both numbers are still considered equal.protected int ulpsDelta()
public static void fail(String message, Object... objects)
message
- the identifying message for the AssertionError
(null
okay)AssertionError
public static void assertTrue(String message, boolean condition)
AssertionError
with the
given message.message
- the identifying message for the AssertionError
(null
okay)condition
- condition to be checkedpublic static void assertTrue(boolean condition)
AssertionError
without a
message.condition
- condition to be checkedpublic static void assertFalse(String message, boolean condition)
AssertionError
with the
given message.message
- the identifying message for the AssertionError
(null
okay)condition
- condition to be checkedpublic static void assertFalse(boolean condition)
AssertionError
without a
message.condition
- condition to be checkedpublic static void assertTrue(boolean condition, String message, Object... objects)
AssertionError
with the
given message.condition
- condition to be checkedmessage
- the identifying message for the AssertionError
objects
- arguments to the format stringpublic static void assertFalse(boolean condition, String message, Object... objects)
AssertionError
with the
given message produced by String.format(java.lang.String, java.lang.Object...)
.condition
- condition to be checkedmessage
- the identifying message for the AssertionError
objects
- arguments to the format string