diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2019-07-27 09:29:30 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2019-07-27 09:29:30 -0400 |
| commit | a623c8fafaa103a902fbdb4936b2ee78463ae5ba (patch) | |
| tree | abd1c4afa132fe4c943369b80a02c5b83ca81f69 /src/test/java/bjc/TestUtils.java | |
| parent | 36a76e6a8cac903a473e581bcf25240ff537eebe (diff) | |
More stack tests
Diffstat (limited to 'src/test/java/bjc/TestUtils.java')
| -rw-r--r-- | src/test/java/bjc/TestUtils.java | 15 |
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()); + } } |
