public class ByteArrayCombinerStreamTest extends BaseTestCase
ByteArrayCombinerStream
.Modifier and Type | Field and Description |
---|---|
private org.apache.derby.client.am.ByteArrayCombinerStream |
combiner |
private static byte[] |
defaultArray |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
ByteArrayCombinerStreamTest(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
static junit.framework.Test |
suite() |
void |
testCombineAvailable4bytes() |
void |
testCombineAvailableNull() |
void |
testCombineNullRead() |
void |
testCombineNullReadArray() |
void |
testCombineOneArray() |
void |
testCombineWithExtraEmptyByteArray()
Make sure an extra "empty" array doesn't cause errors.
|
void |
testCominbe100SmallArrays() |
void |
testNegativeLengthArgument()
Make sure an exception is thrown if a negative length is specified.
|
void |
testNegativeValueInDataCausesEndOfStream()
Demonstrate that the stream does not change negative values in the
underlying data.
|
void |
testTooLittleDataNoCombine()
Make sure an exception is thrown if there is less data available than
the specified length.
|
void |
testTooLittleDataWithCombine()
Make sure an exception is thrown if there is less data available than
the specified length.
|
void |
testTruncateDataFromOneArray() |
void |
testTruncateDataFromTwoArrays() |
alarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSameNullness, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runBare, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeast
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, runTest, setName, setUp, tearDown, toString
private static final byte[] defaultArray
private org.apache.derby.client.am.ByteArrayCombinerStream combiner
public ByteArrayCombinerStreamTest(java.lang.String name)
public void testCombineNullRead() throws java.io.IOException
java.io.IOException
public void testCombineNullReadArray() throws java.io.IOException
java.io.IOException
public void testCombineAvailableNull() throws java.io.IOException
java.io.IOException
public void testCombineAvailable4bytes() throws java.io.IOException
java.io.IOException
public void testCombineWithExtraEmptyByteArray() throws java.io.IOException
nextArray
to not return null
when it
should, causing an ArrayIndexOutOfBoundsException
.
This bug was corrected by DERBY-1417.java.io.IOException
public void testCombineOneArray() throws java.io.IOException
java.io.IOException
public void testCominbe100SmallArrays() throws java.io.IOException
java.io.IOException
public void testTruncateDataFromOneArray() throws java.io.IOException
java.io.IOException
public void testTruncateDataFromTwoArrays() throws java.io.IOException
java.io.IOException
public void testTooLittleDataNoCombine()
public void testTooLittleDataWithCombine()
public void testNegativeLengthArgument()
public void testNegativeValueInDataCausesEndOfStream() throws java.io.IOException
java.io.IOException
public static junit.framework.Test suite()
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.