public class TestBytesUtil extends TestCase2
BytesUtilTestCase2.MyProperties, TestCase2.RandomType_randomType, log| Constructor and Description |
|---|
TestBytesUtil() |
TestBytesUtil(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
test_binarySearch01()
A series of test cases for binary search for a "key" in an array of keys
with an adjustable base (starting offset) and length (#of members).
|
void |
test_bitFlagByteLength() |
void |
test_bitSetTest() |
void |
test_compareBytes()
Test comparison of two variable length signed byte[]s.
|
void |
test_compareBytesSigned()
A byte has a signed value between -128 and 127.
|
void |
test_compareBytesWithOffsetAndLength()
Test of unsigned byte[] comparison with explicit offset into each array
and #of bytes to consider from that offset for each array.
|
void |
test_getByteCount() |
void |
test_getMaskBits_correctRejection()
Correct rejection tests for
BytesUtil.getMSBMask(int) |
void |
test_getMaskBits()
Unit test for
BytesUtil.getMSBMask(int) |
void |
test_getPrefix()
Test method that returns the longest common prefix for two keys.
|
void |
test_getPrefixLength()
Test method that returns the length of the longest common prefix for two
keys.
|
void |
test_getSeparatorKey_correctRejection() |
void |
test_getSeparatorKey()
Test method that chooses the shortest key that is less than one key but
greater than another.
|
void |
test_maskOff()
Unit test for
BytesUtil.maskOffMSB(int, int) |
void |
test_successor()
Verify the semantics of the successor of a byte[] and that the successor
is computed correctly by
BytesUtil.successor(byte[]). |
void |
test_toBitString_correctRejection() |
void |
test_toBitString_emptyByteArray() |
void |
test_toBitString_oneByte() |
void |
test_toBitString_twoBytes() |
void |
test_unsignedByteInc()
Test logic to add one to an unsigned byte in Java.
|
void |
testMaskOffLSB() |
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, logPropertiesassertEquals, 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, toStringpublic TestBytesUtil()
public TestBytesUtil(String name)
name - public void test_getByteCount()
public void test_compareBytesSigned()
byte b = ...;
int signed_b = b & 0xff;
public void test_compareBytes()
public void test_compareBytesWithOffsetAndLength()
public void test_getPrefixLength()
public void test_getPrefix()
public void test_successor()
BytesUtil.successor(byte[]).public void test_unsignedByteInc()
http://en.wikipedia.org/wiki/Two's_complementpublic void test_getSeparatorKey()
public void test_getSeparatorKey_correctRejection()
public void test_binarySearch01()
public void test_bitFlagByteLength()
public void test_bitSetTest()
public void test_getMaskBits_correctRejection()
BytesUtil.getMSBMask(int)public void test_getMaskBits()
BytesUtil.getMSBMask(int)public void test_maskOff()
BytesUtil.maskOffMSB(int, int)public void test_toBitString_correctRejection()
public void test_toBitString_emptyByteArray()
public void test_toBitString_oneByte()
public void test_toBitString_twoBytes()
public void testMaskOffLSB()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.