aboutsummaryrefslogtreecommitdiffstats
path: root/test/com/jogamp
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-05-03 16:32:29 +0200
committerMichael Bien <[email protected]>2011-05-03 16:32:29 +0200
commit6fcf15f11e2a982b480855fbc75e430e5f2b9ad6 (patch)
treec59825ed494930d7ab052272e5e0cb6c3875bf18 /test/com/jogamp
parent3a149a209e905d05bf05c31f94f7a57c6f79250e (diff)
initial import of CLMultiContext utility and test.
Diffstat (limited to 'test/com/jogamp')
-rw-r--r--test/com/jogamp/opencl/CLMultiContextTest.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/test/com/jogamp/opencl/CLMultiContextTest.java b/test/com/jogamp/opencl/CLMultiContextTest.java
new file mode 100644
index 00000000..20274601
--- /dev/null
+++ b/test/com/jogamp/opencl/CLMultiContextTest.java
@@ -0,0 +1,51 @@
+/*
+ * Created on Tuesday, May 03 2011
+ */
+package com.jogamp.opencl;
+
+import org.junit.Rule;
+import org.junit.rules.MethodRule;
+import org.junit.rules.Timeout;
+import com.jogamp.opencl.util.CLMultiContext;
+import java.util.List;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+import static java.lang.System.*;
+
+/**
+ *
+ * @author Michael Bien
+ */
+public class CLMultiContextTest {
+
+ @Rule
+ public MethodRule methodTimeout= new Timeout(10000);
+
+ @Test
+ public void createMultiContextTest() {
+
+ CLMultiContext mc = CLMultiContext.create(CLPlatform.listCLPlatforms());
+
+ try{
+ List<CLContext> contexts = mc.getContexts();
+ List<CLDevice> devices = mc.getDevices();
+
+ assertFalse(contexts.isEmpty());
+ assertFalse(devices.isEmpty());
+
+ for (CLContext context : contexts) {
+ out.println(context);
+ }
+ for (CLDevice device : devices) {
+ out.println(device);
+ }
+
+ }finally{
+ mc.release();
+ }
+
+ }
+
+
+}