/** * Test method: void setValPos(int pos, long val, int bits) * Test method: long getValPos(int pos, int bits) * * @throws Exception */ public void testSetAndGetValPos() throws Exception { int pos = 60; int bits = 10; BitMap instance = new BitMap(1000L); instance.setValPos(pos, 1000, bits); long expResult = 1000L; long result = instance.getValPos(pos, bits); assertEquals(expResult, result); }
/** * Test method: long getValPos(LongBuffer bitmap, int pos, int bits) * * @throws Exception */ public void testGetValPos() throws Exception { int pos = 60; int bits = 10; BitMap instance = new BitMap(1000L); instance.setValPos(pos, 1000, bits); LongBuffer bBuf = instance.getLongBuffer(); long expResult = 1000L; long result = BitMapOps.getValPos(bBuf, pos, bits); assertEquals(expResult, result); }