diff options
Diffstat (limited to 'test/com/mbien/opencl/CLProgramTest.java')
-rw-r--r-- | test/com/mbien/opencl/CLProgramTest.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/com/mbien/opencl/CLProgramTest.java b/test/com/mbien/opencl/CLProgramTest.java index 01fc1504..84e0eed5 100644 --- a/test/com/mbien/opencl/CLProgramTest.java +++ b/test/com/mbien/opencl/CLProgramTest.java @@ -1,5 +1,6 @@ package com.mbien.opencl; +import com.mbien.opencl.CLProgram.Status; import java.io.IOException; import java.util.Map; import org.junit.Test; @@ -7,6 +8,7 @@ import org.junit.Test; import static org.junit.Assert.*; import static java.lang.System.*; import static com.mbien.opencl.CLProgram.CompilerOptions.*; +import static com.mbien.opencl.CLProgram.Status.*; /** * @@ -15,6 +17,15 @@ import static com.mbien.opencl.CLProgram.CompilerOptions.*; public class CLProgramTest { @Test + public void enumsTest() { + + // CLProgram enums + for (Status e : Status.values()) { + assertEquals(e, Status.valueOf(e.STATUS)); + } + } + + @Test public void rebuildProgramTest() throws IOException { out.println(" - - - CLProgramTest; rebuild program test - - - "); @@ -116,7 +127,8 @@ public class CLProgramTest { assertEquals(program.getSource().length(), 0); try{ - program.createCLKernels(); + Map<String, CLKernel> kernels = program.createCLKernels(); + fail("expected an exception from createCLKernels but got: "+kernels); }catch(CLException ex) { // expected, not build yet } |