Skip to content

Commit 688bea5

Browse files
committed
Added Tester test methods.
1 parent 53fd36f commit 688bea5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Tester.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,22 @@ public void intEquals(int expected, int actual, String testTitle) {
5454
}
5555
}
5656

57+
public void doubleEquals(double expected, double actual, String testTitle) {
58+
if (expected == actual) {
59+
printTestSuccess(testTitle);
60+
} else {
61+
printTestFailure(testTitle, String.valueOf(expected), String.valueOf(actual));
62+
}
63+
}
64+
65+
public void isNull(Object actual, String testTitle) {
66+
if (actual == null) {
67+
printTestSuccess(testTitle);
68+
} else {
69+
printTestFailure(testTitle, String.valueOf(null), String.valueOf(actual));
70+
}
71+
}
72+
5773

5874
// PRIVATE
5975
private void updateTestCounter(String testTitle) {

0 commit comments

Comments
 (0)