summaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/test
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-08-08 21:46:55 +0200
committerMichael Bien <[email protected]>2009-08-08 21:46:55 +0200
commit889b9574958b04988ab3acbabab109745fbc379a (patch)
tree5f3485268de0f59f113c9d524561fc49b50ad75f /src/java/com/sun/gluegen/test
parenta07c223b8dbde8f81886b7b2bf602e26ab9531b3 (diff)
parent5f8e46324f245c99080d2c340cd4fb2ec9c4fa8d (diff)
Merge branch 'master' of ssh://[email protected]/gluegen~gluegen-git
Diffstat (limited to 'src/java/com/sun/gluegen/test')
-rw-r--r--src/java/com/sun/gluegen/test/TestPointerBufferEndian.java4
-rw-r--r--src/java/com/sun/gluegen/test/TestStructAccessorEndian.java4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java b/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java
index 1c180bd..ba77eed 100644
--- a/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java
+++ b/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java
@@ -8,9 +8,11 @@ public class TestPointerBufferEndian {
public static void main (String[] args) {
boolean direct = args.length>0 && args[0].equals("-direct");
boolean ok = true;
+ int bitsPtr = CPU.getPointerSizeInBits();
+ String bitsProp = System.getProperty("sun.arch.data.model");
String os = System.getProperty("os.name");
String cpu = System.getProperty("os.arch");
- System.out.println("OS: <"+os+"> CPU: <"+cpu+">");
+ System.out.println("OS: <"+os+"> CPU: <"+cpu+"> Bits: <"+bitsPtr+"/"+bitsProp+">");
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);
diff --git a/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java b/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java
index 4f05256..dc53a10 100644
--- a/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java
+++ b/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java
@@ -7,9 +7,11 @@ import java.nio.*;
public class TestStructAccessorEndian {
public static void main (String args[]) {
boolean ok = true;
+ int bitsPtr = CPU.getPointerSizeInBits();
+ String bitsProp = System.getProperty("sun.arch.data.model");
String os = System.getProperty("os.name");
String cpu = System.getProperty("os.arch");
- System.out.println("OS: <"+os+"> CPU: <"+cpu+">");
+ System.out.println("OS: <"+os+"> CPU: <"+cpu+"> Bits: <"+bitsPtr+"/"+bitsProp+">");
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);