From a623c8fafaa103a902fbdb4936b2ee78463ae5ba Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Sat, 27 Jul 2019 09:29:30 -0400 Subject: More stack tests --- src/test/java/bjc/TestUtils.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/test/java/bjc/TestUtils.java') 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 + * The type of items in the stack. + * + * @param src + * The stack to inspect. + * @param exps + * The values that are expected. + */ + public static void assertStackEquals(bjc.esodata.Stack src, T... exps) { + assertArrayEquals(exps, src.toArray()); + } } -- cgit v1.2.3