ShrinkItArchive/test_src/com/webcodepro/shrinkit/io/TestCaseHelper.java
2008-06-28 15:00:39 +00:00

21 lines
505 B
Java

package com.webcodepro.shrinkit.io;
import junit.framework.TestCase;
/**
* Some commmon testing methods.
*
* @author robgreene@users.sourceforge.net
*/
public abstract class TestCaseHelper extends TestCase {
/**
* Compare two byte arrays.
*/
public void assertEquals(byte[] expected, byte[] actual) {
assertEquals("Length mismatch", expected.length, actual.length);
for (int i=0; i<expected.length; i++) {
assertEquals("Byte mismatch at offset " + i, expected[i], actual[i]);
}
}
}