summaryrefslogtreecommitdiff
path: root/src/test/java/bjc/TestUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/bjc/TestUtils.java')
-rw-r--r--src/test/java/bjc/TestUtils.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/java/bjc/TestUtils.java b/src/test/java/bjc/TestUtils.java
index a8cbf43..c325877 100644
--- a/src/test/java/bjc/TestUtils.java
+++ b/src/test/java/bjc/TestUtils.java
@@ -130,4 +130,19 @@ public class TestUtils {
assertEquals(exp, act);
}
}
+
+ /**
+ * Assert a stack has the given contents.
+ *
+ * @param <T>
+ * The type of items in the stack.
+ *
+ * @param src
+ * The stack to inspect.
+ * @param exps
+ * The values that are expected.
+ */
+ public static <T> void assertStackEquals(bjc.esodata.Stack<T> src, T... exps) {
+ assertArrayEquals(exps, src.toArray());
+ }
}