aboutsummaryrefslogtreecommitdiffstats
path: root/test/com/mbien/opencl/CLProgramTest.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-02-13 16:20:34 +0100
committerMichael Bien <[email protected]>2010-02-13 16:20:34 +0100
commit62d9a63caad9d614a4a4ca90956b38ff623242a5 (patch)
treee90d8726cbd815bc7bfadea1c91ac4f6cb63bbd4 /test/com/mbien/opencl/CLProgramTest.java
parenta93e4532f9515f5b2c0d2c67a45db1236a29ab12 (diff)
added a few tests for event profiling and enums.
fixed bug in LocalMemType and Mem enum valueOf(int foo) methods.
Diffstat (limited to 'test/com/mbien/opencl/CLProgramTest.java')
-rw-r--r--test/com/mbien/opencl/CLProgramTest.java14
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
}