public class TestGetBitsFromByteArray extends TestCase2
BytesUtil.getBits(byte[], int, int)
TestCase2.MyProperties, TestCase2.RandomType
_randomType, log
Constructor and Description |
---|
TestGetBitsFromByteArray() |
TestGetBitsFromByteArray(String name) |
Modifier and Type | Method and Description |
---|---|
void |
test_getBitsFromByteArray_01()
byte[4] (32-bits) with all bits zero.
|
void |
test_getBitsFromByteArray_02()
byte[4] (32-bits) with LSB ONE.
|
void |
test_getBitsFromByteArray_03()
byte[4] (32-bits) with bit ONE (1) set.
|
void |
test_getBitsFromByteArray_04()
byte[4] (32-bits) with MSB ONE (this test case is the mostly likely to
run a foul of a sign bit extension).
|
void |
test_getBitsFromByteArray_05()
byte[4] (32-bits) with slice in the 2nd byte.
|
void |
test_getBitsFromByteArray_06()
byte[2] (16-bits)
|
void |
test_getBitsFromByteArray_correctRejection_nullArg() |
void |
test_getBitsFromByteArray_correctRejection_off_and_len_01()
offset may be zero, but not negative.
|
void |
test_getBitsFromByteArray_correctRejection_off_and_len_02()
length may be zero, but not negative.
|
void |
test_getBitsFromByteArray_correctRejection_off_and_len_03()
length may address all bits (8) in a single byte, but not the 9th bit.
|
void |
test_getBitsFromByteArray_correctRejection_off_and_len_04()
length may address all bits (32) in 4 bytes, but not 33 bits since the
return value would be larger than an int32.
|
void |
test_getBitsFromByteArray_correctRejection_off_and_len_05()
length may address (32) bits in 5 bytes, but not 33 bits since the return
value would be larger than an int32.
|
void |
test_getBitsFromByteArray_zeroLength()
You can request a zero length slice starting at bit zero of a zero length
byte[].
|
void |
test_stress_InputBitStream_compatible()
A stress test for compatibility with
InputBitStream . |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsWithinUlps, assertSameArray, assertSameArray, assertSameBigDecimal, assertSameBigDecimal, assertSameBigInteger, assertSameBigInteger, assertSameIterator, assertSameIterator, assertSameIteratorAnyOrder, assertSameIteratorAnyOrder, assertSameValue, assertSameValue, assertZeroUlps, assertZeroUlps, fail, getInnerCause, getNormalInt, getProjectBuildPath, getProperties, getRandomObject, getRandomObject, getRandomOrder, getRandomString, getTestInputStream, getTestResource, getTestResource, getUlps, getUlps, isDEBUG, isDEBUG, isINFO, isINFO, isInnerCause, logProperties
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, toString
public TestGetBitsFromByteArray()
public TestGetBitsFromByteArray(String name)
public void test_getBitsFromByteArray_correctRejection_nullArg()
public void test_getBitsFromByteArray_correctRejection_off_and_len_01()
public void test_getBitsFromByteArray_correctRejection_off_and_len_02()
public void test_getBitsFromByteArray_correctRejection_off_and_len_03()
public void test_getBitsFromByteArray_correctRejection_off_and_len_04()
public void test_getBitsFromByteArray_correctRejection_off_and_len_05()
public void test_getBitsFromByteArray_zeroLength()
public void test_getBitsFromByteArray_01()
public void test_getBitsFromByteArray_02()
public void test_getBitsFromByteArray_03()
public void test_getBitsFromByteArray_04()
public void test_getBitsFromByteArray_05()
public void test_getBitsFromByteArray_06()
public void test_stress_InputBitStream_compatible() throws IOException
InputBitStream
. An array is
filled with random bits and the behavior of InputBitStream
and
BytesUtil.getBits(byte[], int, int)
is compared on a number of
randomly selected bit slices.IOException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.