summaryrefslogtreecommitdiffstats
path: root/test/com/mbien
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-02-26 17:32:34 +0100
committerMichael Bien <[email protected]>2010-02-26 17:32:34 +0100
commit75d392f3fff6d47fdccae9a8915fea61cdbef990 (patch)
treed4ea906c6ad2d744d33b2cd48a233d52dd358e29 /test/com/mbien
parent4d348191412077970954f3bc6e672a34f4a7980b (diff)
improved CLProgramBuilder and implemented propper configuration loading.
Diffstat (limited to 'test/com/mbien')
-rw-r--r--test/com/mbien/opencl/CLProgramTest.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/test/com/mbien/opencl/CLProgramTest.java b/test/com/mbien/opencl/CLProgramTest.java
index 16684738..647ba1cb 100644
--- a/test/com/mbien/opencl/CLProgramTest.java
+++ b/test/com/mbien/opencl/CLProgramTest.java
@@ -181,6 +181,8 @@ public class CLProgramTest {
.forDevices(context.getDevices())
.withDefine("RADIUS", 5)
.withDefine("ENABLE_FOOBAR");
+
+ out.println(builder);
builder.setProgram(program).build();
assertTrue(program.isExecutable());
@@ -191,18 +193,27 @@ public class CLProgramTest {
builder.save(oos);
oos.close();
+ // build configuration
ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file));
- CLBuildConfiguration builder2 = builder.load(ois);
+ CLBuildConfiguration buildConfig = CLProgramBuilder.loadConfiguration(ois);
ois.close();
- assertEquals(builder, builder2);
+ assertEquals(builder, buildConfig);
+
+ buildConfig.build(program);
+ assertTrue(program.isExecutable());
- builder2.build(program);
+ // program configuration
+ ois = new ObjectInputStream(new FileInputStream(file));
+ CLProgramConfiguration programConfig = CLProgramBuilder.loadConfiguration(ois, context);
+ assertNotNull(programConfig.getProgram());
+ ois.close();
+ program = programConfig.build();
assertTrue(program.isExecutable());
+
// cloneing
assertEquals(builder, builder.clone());
-
}