예제 #1
0
 private void testSetLong(Buffer buff) throws Exception {
   for (int i = 0; i < numSets; i++) {
     buff.setLong(i * 8, i);
   }
   for (int i = 0; i < numSets; i++) {
     assertEquals(i, buff.getLong(i * 8));
   }
 }
예제 #2
0
  @Test
  public void testGetLong() throws Exception {
    int numLongs = 100;
    Buffer b = new Buffer(numLongs * 8);
    for (int i = 0; i < numLongs; i++) {
      b.setLong(i * 8, i);
    }

    for (int i = 0; i < numLongs; i++) {
      assertEquals(i, b.getLong(i * 8));
    }
  }