diff options
author | sg215889 <[email protected]> | 2009-07-15 07:14:45 -0700 |
---|---|---|
committer | sg215889 <[email protected]> | 2009-07-15 07:14:45 -0700 |
commit | c9797e46befa72195fe65a64f65260d88ea575a4 (patch) | |
tree | 3a4a9ae41d9111fb5200254dcc0c741656392da8 /src/java/com/sun | |
parent | 86744e74db26492056bbe74d82997852e14fea8a (diff) |
Tests [PointerBuffer,StructAccessor]: Add diagnosticsJOGL_CDCCVM_sgothel
Diffstat (limited to 'src/java/com/sun')
-rw-r--r-- | src/java/com/sun/gluegen/test/TestPointerBufferEndian.java | 4 | ||||
-rw-r--r-- | src/java/com/sun/gluegen/test/TestStructAccessorEndian.java | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java b/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java index 973c89d..1c180bd 100644 --- a/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java +++ b/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java @@ -8,6 +8,10 @@ public class TestPointerBufferEndian { public static void main (String[] args) { boolean direct = args.length>0 && args[0].equals("-direct"); boolean ok = true; + String os = System.getProperty("os.name"); + String cpu = System.getProperty("os.arch"); + System.out.println("OS: <"+os+"> CPU: <"+cpu+">"); + System.out.println("CPU is: "+ (CPU.is32Bit()?"32":"64") + " bit"); System.out.println("Buffer is in: "+ (BufferFactory.isLittleEndian()?"little":"big") + " endian"); PointerBuffer ptr = direct ? PointerBuffer.allocateDirect(3) : PointerBuffer.allocate(3); ptr.put(0, 0x0123456789ABCDEFL); diff --git a/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java b/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java index 13d7afb..4f05256 100644 --- a/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java +++ b/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java @@ -7,7 +7,11 @@ import java.nio.*; public class TestStructAccessorEndian { public static void main (String args[]) { boolean ok = true; - System.out.println("CPU is : "+ (BufferFactory.isLittleEndian()?"little":"big") + " endian"); + String os = System.getProperty("os.name"); + String cpu = System.getProperty("os.arch"); + System.out.println("OS: <"+os+"> CPU: <"+cpu+">"); + System.out.println("CPU is: "+ (CPU.is32Bit()?"32":"64") + " bit"); + System.out.println("Buffer is in: "+ (BufferFactory.isLittleEndian()?"little":"big") + " endian"); ByteBuffer tst = BufferFactory.newDirectByteBuffer(BufferFactory.SIZEOF_LONG * 3); StructAccessor acc = new StructAccessor(tst); acc.setLongAt(0, 0x0123456789ABCDEFL); |