summaryrefslogtreecommitdiffstats
path: root/src/junit
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-07-20 07:30:48 +0200
committerSven Gothel <[email protected]>2011-07-20 07:30:48 +0200
commit0a8e1566c766f3b5a5e71b5d80500034f1a614a8 (patch)
treea00e98b531393652822d045c77d2da6e185a230a /src/junit
parent846c64d71d0e07ce1f5b4955eba8b49bfa0b5a22 (diff)
Cleanup: Platform CPU enum, MachineDescription,
Platform: - enum CPUFamily is part of CPUType - DALVIK -> ANDROID - ARM: ARM + ARMv[567] MachineDescription - self contained - static size/alignment Config (enum) for unix32, unix64, win32, win64 and armeabi - add 'long double' - Removed MachineDescription32Bit, MachineDescription64Bit - createStatic(..) uses OS/CPU to fetch best match if not at runtime FIXES: JavaEmitter's struct-emit: Proper 32/64 struct sizes TODO: StructAccessor's mapping to <Type>Buffer w/ index os sizeof(<Type>) doesn't work, since offset may not be multiple of sizeof(<Type>)! i.e. typedef struct { int8_t bits1; // +1 - 0 // +3 (p32) int32_t id; // +4 - 4 int8_t bits2; // +1 - 8 // +3 (p32) - int64_t long0; // +8 - 12 so "longBuffer.get(<type-sized index>)" is invalid, but "byteBuffer.getLong(<byte index>)" must be done. The actual impl. doesn't matter, hence dropping the other nio type mappings is good.
Diffstat (limited to 'src/junit')
-rw-r--r--src/junit/com/jogamp/common/util/IntIntHashMapTest.java2
-rw-r--r--src/junit/com/jogamp/common/util/IntObjectHashMapTest.java2
-rw-r--r--src/junit/com/jogamp/common/util/LongIntHashMapTest.java2
-rw-r--r--src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java2
-rw-r--r--src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java8
5 files changed, 8 insertions, 8 deletions
diff --git a/src/junit/com/jogamp/common/util/IntIntHashMapTest.java b/src/junit/com/jogamp/common/util/IntIntHashMapTest.java
index 09aff1c..22ff25a 100644
--- a/src/junit/com/jogamp/common/util/IntIntHashMapTest.java
+++ b/src/junit/com/jogamp/common/util/IntIntHashMapTest.java
@@ -55,7 +55,7 @@ public class IntIntHashMapTest {
@BeforeClass
public static void init() {
- iterations = ( Platform.CPUType.ARM == Platform.CPU_TYPE ) ? 100 : 10000;
+ iterations = ( Platform.getCPUType().getFamily() == Platform.CPUFamily.ARM ) ? 100 : 10000;
pairs = new IntIntUniqueRndValues(iterations);
}
diff --git a/src/junit/com/jogamp/common/util/IntObjectHashMapTest.java b/src/junit/com/jogamp/common/util/IntObjectHashMapTest.java
index 00de133..2bbce8b 100644
--- a/src/junit/com/jogamp/common/util/IntObjectHashMapTest.java
+++ b/src/junit/com/jogamp/common/util/IntObjectHashMapTest.java
@@ -54,7 +54,7 @@ public class IntObjectHashMapTest {
@BeforeClass
public static void init() {
- iterations = ( Platform.getCPUType() == Platform.CPUType.ARM ) ? 100 : 10000;
+ iterations = ( Platform.getCPUType().getFamily() == Platform.CPUFamily.ARM ) ? 100 : 10000;
pairs = new IntIntObjUniqueRndValues(iterations);
}
diff --git a/src/junit/com/jogamp/common/util/LongIntHashMapTest.java b/src/junit/com/jogamp/common/util/LongIntHashMapTest.java
index 239bef1..2426526 100644
--- a/src/junit/com/jogamp/common/util/LongIntHashMapTest.java
+++ b/src/junit/com/jogamp/common/util/LongIntHashMapTest.java
@@ -55,7 +55,7 @@ public class LongIntHashMapTest {
@BeforeClass
public static void init() {
- iterations = ( Platform.getCPUType() == Platform.CPUType.ARM ) ? 100 : 10000;
+ iterations = ( Platform.getCPUFamily() == Platform.CPUFamily.ARM ) ? 100 : 10000;
pairs = new LongIntUniqueRndValues(iterations);
}
diff --git a/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java b/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java
index da797dc..6bdfbd1 100644
--- a/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java
+++ b/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java
@@ -42,7 +42,7 @@ import com.jogamp.common.os.Platform;
public class TestIteratorIndexCORE {
static int elems = 10;
- static int loop = ( Platform.getCPUType() == Platform.CPUType.ARM ) ? 100 : 9999999;
+ static int loop = ( Platform.getCPUFamily() == Platform.CPUFamily.ARM ) ? 100 : 9999999;
public void populate(List l, int len) {
while(len>0) {
diff --git a/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java b/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java
index bee9b44..099f8b8 100644
--- a/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java
+++ b/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java
@@ -212,7 +212,7 @@ public class TestRecursiveLock01 {
// @Test
public void testLockedObjectThreading2x10000() throws InterruptedException {
System.err.println("++++ TestRecursiveLock01.testLockedObjectThreading2x10000");
- if( Platform.getCPUType() == Platform.CPUType.ARM ) {
+ if( Platform.getCPUFamily() == Platform.CPUFamily.ARM ) {
testLockedObjectImpl(2, 10, 10, YIELD_NONE);
} else {
testLockedObjectImpl(2, 10000, 10000, YIELD_NONE);
@@ -223,7 +223,7 @@ public class TestRecursiveLock01 {
@Test
public void testLockedObjectThreading25x25Yield() throws InterruptedException {
System.err.println("++++ TestRecursiveLock01.testLockedObjectThreading25x25-Yield");
- if( Platform.getCPUType() == Platform.CPUType.ARM ) {
+ if( Platform.getCPUFamily() == Platform.CPUFamily.ARM ) {
testLockedObjectImpl(5, 25, 10, YIELD_YIELD);
} else {
testLockedObjectImpl(25, 25, 100, YIELD_YIELD);
@@ -234,7 +234,7 @@ public class TestRecursiveLock01 {
// @Test
public void testLockedObjectThreading25x25Sleep() throws InterruptedException {
System.err.println("++++ TestRecursiveLock01.testLockedObjectThreading25x25-Sleep");
- if( Platform.getCPUType() == Platform.CPUType.ARM ) {
+ if( Platform.getCPUFamily() == Platform.CPUFamily.ARM ) {
testLockedObjectImpl(5, 25, 10, YIELD_SLEEP);
} else {
testLockedObjectImpl(25, 25, 100, YIELD_SLEEP);
@@ -245,7 +245,7 @@ public class TestRecursiveLock01 {
@Test
public void testLockedObjectThreading25x25None() throws InterruptedException {
System.err.println("++++ TestRecursiveLock01.testLockedObjectThreading25x25-None");
- if( Platform.getCPUType() == Platform.CPUType.ARM ) {
+ if( Platform.getCPUFamily() == Platform.CPUFamily.ARM ) {
testLockedObjectImpl(5, 25, 10, YIELD_NONE);
} else {
testLockedObjectImpl(25, 25, 100, YIELD_NONE);