Initial version based on previous work. (Version alpha 7)

This commit is contained in:
Jindra Pet��k
2010-09-04 13:57:22 +02:00
commit a34ee7364c
1147 changed files with 84884 additions and 0 deletions
@@ -0,0 +1,30 @@
package com.jpexs.asdec;
import com.jpexs.asdec.abc.ABCInputStream;
import com.jpexs.asdec.abc.ABCOutputStream;
import junit.framework.TestCase;
import org.junit.Test;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
public class TestABCStream extends TestCase {
@Test
public void testU30() {
try {
long number = 1531;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ABCOutputStream aos = new ABCOutputStream(baos);
aos.writeU30(number);
aos.close();
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
ABCInputStream ais = new ABCInputStream(bais);
assertEquals(number, ais.readU30());
assertEquals(0, bais.available());
ais.close();
} catch (IOException ex) {
fail();
}
}
}