diff --git a/pom.xml b/pom.xml
index 34b9a8a..9a6b388 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,6 +69,12 @@
1.16.1
test
+
+ org.hamcrest
+ hamcrest-all
+ test
+ 1.3
+
UTF-8
diff --git a/test/testutil/TestUtilities.java b/test/testutil/TestUtilities.java
index 6220bf4..94e6c2a 100644
--- a/test/testutil/TestUtilities.java
+++ b/test/testutil/TestUtilities.java
@@ -2,10 +2,10 @@ package testutil;
import static error.ErrorManager.Severity.ERROR;
import static function.builtin.EVAL.eval;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.isEmptyOrNullString;
+import static org.hamcrest.Matchers.not;
+import static org.junit.Assert.assertThat;
import static sexpression.Nil.NIL;
import java.io.ByteArrayInputStream;
@@ -85,17 +85,16 @@ public final class TestUtilities {
}
public static void assertSExpressionsMatch(SExpression one, SExpression two) {
- assertEquals(one.toString(), two.toString());
+ assertThat(one.toString(), is(two.toString()));
}
public static void assertSExpressionsDoNotMatch(SExpression one, SExpression two) {
- assertNotEquals(one.toString(), two.toString());
+ assertThat(one.toString(), not(two.toString()));
}
public static void assertIsErrorWithMessage(LispException e) {
- assertEquals(ERROR, e.getSeverity());
- assertNotNull(e.getMessage());
- assertTrue(e.getMessage().length() > 0);
+ assertThat(e.getSeverity(), is(ERROR));
+ assertThat(e.getMessage(), not(isEmptyOrNullString()));
}
}