diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/com/jogamp/opencl/HighLevelBindingTest.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/com/jogamp/opencl/HighLevelBindingTest.java b/test/com/jogamp/opencl/HighLevelBindingTest.java index 33cce0b5..35c13261 100644 --- a/test/com/jogamp/opencl/HighLevelBindingTest.java +++ b/test/com/jogamp/opencl/HighLevelBindingTest.java @@ -200,6 +200,33 @@ public class HighLevelBindingTest { assertEquals(deviceCount, c.getDevices().length); c.release(); + + //Exceptions + try{ + CLContext.create((CLDevice)null); + fail("create with null device"); + }catch(IllegalArgumentException ex) { + // expected + } + try{ + CLContext.create((CLDevice.Type)null); + fail("create with null CLDevice.Type"); + }catch(IllegalArgumentException ex) { + // 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) { + // expected + } + } @Test |