summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common/util
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-10-14 21:30:14 +0200
committerSven Gothel <[email protected]>2010-10-14 21:30:14 +0200
commit1c7f8f8dafe0252afbb0e2701687210814b56793 (patch)
tree99e9830d5b57ab55fc109f30f9196dff6131b810 /src/junit/com/jogamp/common/util
parent52dcea28906b3e61ef44595399e525dd5169c014 (diff)
Moved locking to: com.jogamp.common.util.locks ; Better abstraction ; Misc changes
Diffstat (limited to 'src/junit/com/jogamp/common/util')
-rw-r--r--src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java (renamed from src/junit/com/jogamp/common/util/TestRecursiveToolkitLock.java)27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/junit/com/jogamp/common/util/TestRecursiveToolkitLock.java b/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java
index ea2e925..e7560d9 100644
--- a/src/junit/com/jogamp/common/util/TestRecursiveToolkitLock.java
+++ b/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java
@@ -26,8 +26,9 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.common.util;
+package com.jogamp.common.util.locks;
+import com.jogamp.common.util.locks.RecursiveLock;
import java.lang.reflect.*;
import java.io.IOException;
@@ -38,7 +39,7 @@ import org.junit.After;
import org.junit.AfterClass;
import org.junit.Test;
-public class TestRecursiveToolkitLock {
+public class TestRecursiveLock01 {
static final int YIELD_NONE = 0;
static final int YIELD_YIELD = 1;
@@ -66,7 +67,7 @@ public class TestRecursiveToolkitLock {
static final boolean DEBUG = false;
public LockedObject() {
- locker = new RecursiveToolkitLock();
+ locker = new RecursiveLock();
actionCounter = 0;
}
@@ -140,7 +141,7 @@ public class TestRecursiveToolkitLock {
return locker.isLocked();
}
- RecursiveToolkitLock locker;
+ RecursiveLock locker;
int actionCounter;
}
@@ -218,30 +219,30 @@ public class TestRecursiveToolkitLock {
// @Test
public void testLockedObjectThreading2x10000() throws InterruptedException {
- System.err.println("++++ TestRecursiveToolkitLock.testLockedObjectThreading2x10000");
+ System.err.println("++++ TestRecursiveLock01.testLockedObjectThreading2x10000");
testLockedObjectImpl(2, 10000, 10000, YIELD_NONE);
- System.err.println("---- TestRecursiveToolkitLock.testLockedObjectThreading2x10000");
+ System.err.println("---- TestRecursiveLock01.testLockedObjectThreading2x10000");
}
@Test
public void testLockedObjectThreading200x200Yield() throws InterruptedException {
- System.err.println("++++ TestRecursiveToolkitLock.testLockedObjectThreading200x200-Yield");
+ System.err.println("++++ TestRecursiveLock01.testLockedObjectThreading200x200-Yield");
testLockedObjectImpl(200, 200, 100, YIELD_YIELD);
- System.err.println("---- TestRecursiveToolkitLock.testLockedObjectThreading200x200-Yield");
+ System.err.println("---- TestRecursiveLock01.testLockedObjectThreading200x200-Yield");
}
// @Test
public void testLockedObjectThreading200x200Sleep() throws InterruptedException {
- System.err.println("++++ TestRecursiveToolkitLock.testLockedObjectThreading200x200-Sleep");
+ System.err.println("++++ TestRecursiveLock01.testLockedObjectThreading200x200-Sleep");
testLockedObjectImpl(200, 200, 100, YIELD_SLEEP);
- System.err.println("---- TestRecursiveToolkitLock.testLockedObjectThreading200x200-Sleep");
+ System.err.println("---- TestRecursiveLock01.testLockedObjectThreading200x200-Sleep");
}
@Test
public void testLockedObjectThreading200x200None() throws InterruptedException {
- System.err.println("++++ TestRecursiveToolkitLock.testLockedObjectThreading200x200-None");
+ System.err.println("++++ TestRecursiveLock01.testLockedObjectThreading200x200-None");
testLockedObjectImpl(200, 200, 100, YIELD_NONE);
- System.err.println("---- TestRecursiveToolkitLock.testLockedObjectThreading200x200-None");
+ System.err.println("---- TestRecursiveLock01.testLockedObjectThreading200x200-None");
}
static int atoi(String a) {
@@ -260,7 +261,7 @@ public class TestRecursiveToolkitLock {
}
System.out.println("durationPerTest: "+durationPerTest);
*/
- String tstname = TestRecursiveToolkitLock.class.getName();
+ String tstname = TestRecursiveLock01.class.getName();
/*
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(new String[] {
tstname,