public class CompressedNumberTest
extends junit.framework.TestCase
| Modifier and Type | Field and Description |
|---|---|
private static org.apache.derby.iapi.services.io.ArrayInputStream |
ais |
private static org.apache.derby.iapi.services.io.ArrayOutputStream |
aos |
private static byte[] |
holder |
private static java.io.DataInput |
in |
private static java.io.InputStream |
in_stream |
private static java.io.DataOutput |
out |
| Constructor and Description |
|---|
CompressedNumberTest(java.lang.String name)
Public constructor required for running test as stand alone JUnit.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
checkInt(int i,
int expectedLength)
Check whether CompressedNumber can work well on integer passed.
|
private void |
checkLong(long l,
int expectedLength)
Check whether CompressedNumber can work well on long number passed.
|
void |
testInt() |
void |
testIntWidely() |
void |
testLong() |
void |
testLongWidely() |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toStringprivate static byte[] holder
private static org.apache.derby.iapi.services.io.ArrayOutputStream aos
private static java.io.DataOutput out
private static org.apache.derby.iapi.services.io.ArrayInputStream ais
private static java.io.DataInput in
private static java.io.InputStream in_stream
public CompressedNumberTest(java.lang.String name)
name - name to present this test case.public void testLong()
throws java.io.IOException
java.io.IOExceptionpublic void testLongWidely()
throws java.io.IOException
java.io.IOExceptionpublic void testInt()
throws java.io.IOException
java.io.IOExceptionpublic void testIntWidely()
throws java.io.IOException
java.io.IOExceptionprivate void checkInt(int i,
int expectedLength)
throws java.io.IOException
i - the integer to be checked.expectedLength - the length expected of i after compressed.java.io.IOExceptionprivate void checkLong(long l,
int expectedLength)
throws java.io.IOException
l - the long number to be checked.expectedLength - the length expected of l after compressed.java.io.IOExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.