aboutsummaryrefslogtreecommitdiffstats
path: root/test/com/jogamp/opencl/util
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-01-26 03:33:17 +0100
committerSven Gothel <[email protected]>2014-01-26 03:33:17 +0100
commit00502aedb935a8bbb0d5f4407dfe35d8e60c8f97 (patch)
treeddd2f8409202eaf00cd1acbb5342b6973aa7b150 /test/com/jogamp/opencl/util
parent30b423fc8d71d05e789c087b2d45cf0e7bf8c542 (diff)
Adapt all unit tests to use UITestCase and enforce named unit test order. Added main entry and listed in tests.sh for manual test.
Diffstat (limited to 'test/com/jogamp/opencl/util')
-rw-r--r--test/com/jogamp/opencl/util/concurrent/CLMultiContextTest.java23
1 files changed, 19 insertions, 4 deletions
diff --git a/test/com/jogamp/opencl/util/concurrent/CLMultiContextTest.java b/test/com/jogamp/opencl/util/concurrent/CLMultiContextTest.java
index 818827c6..a8c10ed4 100644
--- a/test/com/jogamp/opencl/util/concurrent/CLMultiContextTest.java
+++ b/test/com/jogamp/opencl/util/concurrent/CLMultiContextTest.java
@@ -10,17 +10,26 @@ import com.jogamp.opencl.CLContext;
import com.jogamp.opencl.CLDevice;
import com.jogamp.opencl.CLKernel;
import com.jogamp.opencl.CLPlatform;
+import com.jogamp.opencl.test.util.UITestCase;
import com.jogamp.opencl.util.concurrent.CLQueueContext.CLSimpleQueueContext;
import com.jogamp.opencl.util.concurrent.CLQueueContextFactory.CLSimpleContextFactory;
+
+import java.io.IOException;
import java.nio.IntBuffer;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
+
+import org.junit.FixMethodOrder;
import org.junit.Rule;
import org.junit.rules.Timeout;
+import org.junit.runners.MethodSorters;
+
import com.jogamp.opencl.util.CLMultiContext;
+
import java.nio.Buffer;
import java.util.ArrayList;
import java.util.List;
+
import org.junit.Test;
import static org.junit.Assert.*;
@@ -28,9 +37,10 @@ import static java.lang.System.*;
/**
*
- * @author Michael Bien
+ * @author Michael Bien, et.al
*/
-public class CLMultiContextTest {
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class CLMultiContextTest extends UITestCase {
@Rule
public Timeout methodTimeout= new Timeout(10000);
@@ -78,7 +88,7 @@ public class CLMultiContextTest {
}
public Buffer execute(CLSimpleQueueContext qc) {
-
+
CLCommandQueue queue = qc.getQueue();
CLContext context = qc.getCLContext();
CLKernel kernel = qc.getKernel("compute");
@@ -119,7 +129,7 @@ public class CLMultiContextTest {
final int slice = 64;
final int tasksPerQueue = 10;
final int taskCount = pool.getSize() * tasksPerQueue;
-
+
IntBuffer data = Buffers.newDirectIntBuffer(slice*taskCount);
List<CLTestTask> tasks = new ArrayList<CLTestTask>(taskCount);
@@ -168,4 +178,9 @@ public class CLMultiContextTest {
data.rewind();
}
+ public static void main(String[] args) throws IOException {
+ String tstname = CLMultiContextTest.class.getName();
+ org.junit.runner.JUnitCore.main(tstname);
+ }
+
}