diff options
Diffstat (limited to 'test/com')
-rw-r--r-- | test/com/jogamp/opencl/HighLevelBindingTest.java | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/test/com/jogamp/opencl/HighLevelBindingTest.java b/test/com/jogamp/opencl/HighLevelBindingTest.java index e927f1fa..3755221b 100644 --- a/test/com/jogamp/opencl/HighLevelBindingTest.java +++ b/test/com/jogamp/opencl/HighLevelBindingTest.java @@ -169,8 +169,8 @@ public class HighLevelBindingTest { out.println(" - - - highLevelTest; create context - - - "); CLPlatform platform = CLPlatform.getDefault(); - int deviceCount = platform.listCLDevices().length; - CLDevice firstDevice = platform.listCLDevices()[0]; + CLDevice[] devices = platform.listCLDevices(); + int deviceCount = devices.length; CLContext c = CLContext.create(); assertNotNull(c); @@ -182,21 +182,18 @@ public class HighLevelBindingTest { assertEquals(deviceCount, c.getDevices().length); c.release(); - c = CLContext.create(firstDevice); - assertNotNull(c); - assertEquals(1, c.getDevices().length); - c.release(); + for (CLDevice device : devices) { + c = CLContext.create(device); + assertNotNull(c); + assertEquals(1, c.getDevices().length); + c.release(); + } c = CLContext.create(CLDevice.Type.ALL); assertNotNull(c); assertEquals(deviceCount, c.getDevices().length); c.release(); - c = CLContext.create(platform, firstDevice); - assertNotNull(c); - assertEquals(1, c.getDevices().length); - c.release(); - c = CLContext.create(platform, CLDevice.Type.ALL); assertNotNull(c); assertEquals(deviceCount, c.getDevices().length); @@ -217,12 +214,6 @@ public class HighLevelBindingTest { // expected } try{ - CLContext.create((CLPlatform)null, (CLDevice)null); - fail("create with null device"); - }catch(IllegalArgumentException ex) { - // expected - } - try{ CLContext.create((CLPlatform)null, (CLDevice.Type)null); fail("create with null CLDevice.Type"); }catch(IllegalArgumentException ex) { |