mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
added eg.OffHeapByteArrayExampleTest
This commit is contained in:
@@ -54,16 +54,18 @@ public class OffHeapByteArrayExampleTest {
|
||||
|
||||
chm.put(key, value);
|
||||
|
||||
// clear the byteValue just to prove it works when we read it back
|
||||
byteValue.setValue((byte) '0');
|
||||
// clear the value to prove it works
|
||||
byteValue.setValue((byte) 0);
|
||||
value.setByteValueAt(1, byteValue);
|
||||
|
||||
chm.getUsing(key, value);
|
||||
|
||||
Assert.assertEquals(0, value.getByteValueAt(2).getValue());
|
||||
Assert.assertEquals(0, value.getByteValueAt(3).getValue());
|
||||
|
||||
byte actual = value.getByteValueAt(1).getValue();
|
||||
Assert.assertEquals(EXPECTED, actual);
|
||||
|
||||
Assert.assertEquals(0, value.getByteValueAt(2).getValue());
|
||||
Assert.assertEquals(0, value.getByteValueAt(3).getValue());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user