public void testDirectShortBufferArgument() {
ByteBuffer buf = ByteBuffer.allocateDirect(1024*2).order(ByteOrder.nativeOrder());
ShortBuffer shortBuf = buf.asShortBuffer();
final short MAGIC = (short)0xABED;
lib.fillInt16Buffer(shortBuf, 1024, MAGIC);
for (int i=0;i < shortBuf.capacity();i++) {
assertEquals("Bad value at index " + i, MAGIC, shortBuf.get(i));
}
}
public void testDirectIntBufferArgument() {