aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-02-13 13:23:21 +0100
committerMichael Bien <[email protected]>2011-02-13 13:23:21 +0100
commit21e0b226492fe1db0126528c5fddfb29d222a9cd (patch)
treeb9e6472d8e700735ba74c90771951c7b81c9ad56
parent7a1e5564a4ad86d0b122c056a71373bbeb472be6 (diff)
moved struct and buffer test to its nio friends, cleaned up imports
-rw-r--r--src/junit/com/jogamp/common/nio/TestPointerBufferEndian.java (renamed from src/junit/com/jogamp/gluegen/test/junit/runtime/TestPointerBufferEndian.java)13
-rw-r--r--src/junit/com/jogamp/common/nio/TestStructAccessorEndian.java (renamed from src/junit/com/jogamp/gluegen/test/junit/runtime/TestStructAccessorEndian.java)10
2 files changed, 8 insertions, 15 deletions
diff --git a/src/junit/com/jogamp/gluegen/test/junit/runtime/TestPointerBufferEndian.java b/src/junit/com/jogamp/common/nio/TestPointerBufferEndian.java
index afe3405..da232a2 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/runtime/TestPointerBufferEndian.java
+++ b/src/junit/com/jogamp/common/nio/TestPointerBufferEndian.java
@@ -1,14 +1,9 @@
-package com.jogamp.gluegen.test.junit.runtime;
+package com.jogamp.common.nio;
-import com.jogamp.common.nio.*;
import com.jogamp.common.os.*;
-import java.nio.*;
-
import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
import org.junit.Test;
import static java.lang.System.*;
@@ -20,9 +15,9 @@ public class TestPointerBufferEndian {
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+"> Bits: <"+bitsPtr+"/"+bitsProp+">");
- System.out.println("CPU is: "+ (Platform.is32Bit()?"32":"64") + " bit");
- System.out.println("Buffer is in: "+ (Platform.isLittleEndian()?"little":"big") + " endian");
+ out.println("OS: <"+os+"> CPU: <"+cpu+"> Bits: <"+bitsPtr+"/"+bitsProp+">");
+ out.println("CPU is: "+ (Platform.is32Bit()?"32":"64") + " bit");
+ out.println("Buffer is in: "+ (Platform.isLittleEndian()?"little":"big") + " endian");
long[] valuesSource = { 0x0123456789ABCDEFL, 0x8877665544332211L, 0xAFFEDEADBEEFAFFEL };
long[] values32Bit = { 0x0000000089ABCDEFL, 0x0000000044332211L, 0x00000000BEEFAFFEL };
diff --git a/src/junit/com/jogamp/gluegen/test/junit/runtime/TestStructAccessorEndian.java b/src/junit/com/jogamp/common/nio/TestStructAccessorEndian.java
index 264c86b..09781ec 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/runtime/TestStructAccessorEndian.java
+++ b/src/junit/com/jogamp/common/nio/TestStructAccessorEndian.java
@@ -1,4 +1,4 @@
-package com.jogamp.gluegen.test.junit.runtime;
+package com.jogamp.common.nio;
import com.jogamp.common.nio.*;
import com.jogamp.common.os.*;
@@ -6,8 +6,6 @@ import com.jogamp.common.os.*;
import java.nio.*;
import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
import org.junit.Test;
import static java.lang.System.*;
@@ -20,9 +18,9 @@ public class TestStructAccessorEndian {
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+"> Bits: <"+bitsPtr+"/"+bitsProp+">");
- System.out.println("CPU is: "+ (Platform.is32Bit()?"32":"64") + " bit");
- System.out.println("Buffer is in: "+ (Platform.isLittleEndian()?"little":"big") + " endian");
+ out.println("OS: <"+os+"> CPU: <"+cpu+"> Bits: <"+bitsPtr+"/"+bitsProp+">");
+ out.println("CPU is: "+ (Platform.is32Bit()?"32":"64") + " bit");
+ out.println("Buffer is in: "+ (Platform.isLittleEndian()?"little":"big") + " endian");
long[] valuesSource = { 0x0123456789ABCDEFL, 0x8877665544332211L, 0xAFFEDEADBEEFAFFEL };
ByteBuffer tst = Buffers.newDirectByteBuffer(Buffers.SIZEOF_LONG * valuesSource.length);