aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/POITestCase.java
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2015-06-30 23:50:35 +0000
committerNick Burch <nick@apache.org>2015-06-30 23:50:35 +0000
commit335ba49ef5dc86fcb5ffbda2782e1b16b84cfef8 (patch)
treec909f02efec3d8ac8cdcf7f7ed3bbb65f123303e /src/testcases/org/apache/poi/POITestCase.java
parent2f735be6f168ee5ce7920234912c1cb11627a4a1 (diff)
downloadpoi-335ba49ef5dc86fcb5ffbda2782e1b16b84cfef8.tar.gz
poi-335ba49ef5dc86fcb5ffbda2782e1b16b84cfef8.zip
More NPOIFS ministream tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1688534 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/POITestCase.java')
-rw-r--r--src/testcases/org/apache/poi/POITestCase.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/POITestCase.java b/src/testcases/org/apache/poi/POITestCase.java
index 7a1a0274c7..e38e46d4fe 100644
--- a/src/testcases/org/apache/poi/POITestCase.java
+++ b/src/testcases/org/apache/poi/POITestCase.java
@@ -34,6 +34,21 @@ public class POITestCase extends TestCase {
);
}
+ public static <T> void assertEquals(T[] expected, T[] actual)
+ {
+ assertEquals("Non-matching lengths", expected.length, actual.length);
+ for (int i=0; i<expected.length; i++) {
+ assertEquals("Mis-match at offset " + i, expected[i], actual[i]);
+ }
+ }
+ public static void assertEquals(byte[] expected, byte[] actual)
+ {
+ assertEquals("Non-matching lengths", expected.length, actual.length);
+ for (int i=0; i<expected.length; i++) {
+ assertEquals("Mis-match at offset " + i, expected[i], actual[i]);
+ }
+ }
+
public static <T> void assertContains(T needle, T[] haystack)
{
// Check