/** * Test method: void setVal(int i, long val) * Test method: long getVal(int i)* * * @throws Exception */ public void testSetAndGetVal() throws Exception { BMArray instance = new BMArray(1000, 64); for (int i = 0; i < 1000; i++) { instance.setVal(i, i); } for (int i = 0; i < 1000; i++) { long result = instance.getVal(i); assertEquals(i, result); } }
/** * Test method: long getVal(LongBuffer B, int i, int bits) * * @throws Exception */ public void testGetVal() throws Exception { BMArray bmArray = new BMArray(1000, 64); for (int i = 0; i < 1000; i++) { bmArray.setVal(i, i); } LongBuffer bBuf = bmArray.getLongBuffer(); for (int i = 0; i < 1000; i++) { assertEquals(BMArrayOps.getVal(bBuf, i, 64), i); } } }