private void testSetFloat(Buffer buff) throws Exception { for (int i = 0; i < numSets; i++) { buff.setFloat(i * 4, (float) i); } for (int i = 0; i < numSets; i++) { assertEquals((float) i, buff.getFloat(i * 4)); } }
@Test public void testGetFloat() throws Exception { int numFloats = 100; Buffer b = new Buffer(numFloats * 4); for (int i = 0; i < numFloats; i++) { b.setFloat(i * 4, i); } for (int i = 0; i < numFloats; i++) { assertEquals((float) i, b.getFloat(i * 4)); } }