aboutsummaryrefslogtreecommitdiffstats
path: root/test/com/jogamp/opencl/CLBufferTest.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-01-26 03:33:17 +0100
committerSven Gothel <[email protected]>2014-01-26 03:33:17 +0100
commit00502aedb935a8bbb0d5f4407dfe35d8e60c8f97 (patch)
treeddd2f8409202eaf00cd1acbb5342b6973aa7b150 /test/com/jogamp/opencl/CLBufferTest.java
parent30b423fc8d71d05e789c087b2d45cf0e7bf8c542 (diff)
Adapt all unit tests to use UITestCase and enforce named unit test order. Added main entry and listed in tests.sh for manual test.
Diffstat (limited to 'test/com/jogamp/opencl/CLBufferTest.java')
-rw-r--r--test/com/jogamp/opencl/CLBufferTest.java20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/com/jogamp/opencl/CLBufferTest.java b/test/com/jogamp/opencl/CLBufferTest.java
index e85f4504..1b9b8357 100644
--- a/test/com/jogamp/opencl/CLBufferTest.java
+++ b/test/com/jogamp/opencl/CLBufferTest.java
@@ -30,7 +30,10 @@ package com.jogamp.opencl;
import com.jogamp.opencl.CLMemory.Mem;
import com.jogamp.opencl.CLMemory.Map;
+import com.jogamp.opencl.test.util.UITestCase;
import com.jogamp.common.nio.Buffers;
+
+import java.io.IOException;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
@@ -41,7 +44,10 @@ import java.nio.ShortBuffer;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
+
+import org.junit.FixMethodOrder;
import org.junit.Test;
+import org.junit.runners.MethodSorters;
import static org.junit.Assert.*;
import static java.lang.System.*;
@@ -51,11 +57,10 @@ import static com.jogamp.opencl.util.CLPlatformFilters.*;
import static com.jogamp.opencl.CLVersion.*;
/**
- *
- * @author Michael Bien
+ * @author Michael Bien, et.al.
*/
-public class CLBufferTest {
-
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class CLBufferTest extends UITestCase {
@Test
public void createBufferTest() {
@@ -94,7 +99,7 @@ public class CLBufferTest {
assertEquals(buffer.getNIOSize(), buffer.getCLSize());
assertEquals(sizeOfBufferElem(nio), buffer.getElementSize());
assertEquals(nio.capacity() * sizeOfBufferElem(nio), buffer.getCLSize());
-
+
CLBuffer<ByteBuffer> clone = buffer.cloneWith(anotherNIO);
assertEquals(buffer.ID, clone.ID);
@@ -341,5 +346,8 @@ public class CLBufferTest {
}
-
+ public static void main(String[] args) throws IOException {
+ String tstname = CLBufferTest.class.getName();
+ org.junit.runner.JUnitCore.main(tstname);
+ }
}