summaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-02-01 04:27:20 +0100
committerSven Gothel <[email protected]>2011-02-01 04:27:20 +0100
commite49386191079b08ee216f056338979be80029264 (patch)
treec9ba16672f1aca8429288a2a2632c4736d56930c /src/test/com
parentdaea466337b1ed37e7e59d5a482ec69290155220 (diff)
junit glu: proper path and NOUI class suffix
Diffstat (limited to 'src/test/com')
-rwxr-xr-xsrc/test/com/jogamp/opengl/test/junit/jogl/glu/TestGluUnprojectDoubleNOUI.java29
-rwxr-xr-xsrc/test/com/jogamp/opengl/test/junit/jogl/glu/TestGluUnprojectFloatNOUI.java30
2 files changed, 59 insertions, 0 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestGluUnprojectDoubleNOUI.java b/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestGluUnprojectDoubleNOUI.java
new file mode 100755
index 000000000..348a76930
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestGluUnprojectDoubleNOUI.java
@@ -0,0 +1,29 @@
+package com.jogamp.test.junit.jogl.glu;
+
+import javax.media.opengl.glu.GLU;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Julien Gouesse
+ */
+public class TestGluUnprojectDoubleNOUI {
+
+ @Test
+ public void test(){
+ final GLU glu = new GLU();
+ final int[] pickedPoint = new int[]{400,300};
+ final double pickedPointDepth = 0;
+ final double[] sceneModelViewValues = new double[]{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
+ final double[] projectionValues = new double[]{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
+ final int[] viewport = new int[]{0,0,800,600};
+ final double[] objCoords = new double[]{Double.NaN,Double.NaN,Double.NaN};
+ glu.gluUnProject(pickedPoint[0], pickedPoint[1], pickedPointDepth, sceneModelViewValues, 0, projectionValues, 0, viewport, 0, objCoords, 0);
+ Assert.assertTrue(!Double.isNaN(objCoords[0])&&!Double.isNaN(objCoords[1])&&!Double.isNaN(objCoords[2]));
+ }
+
+ public static void main(String args[]) {
+ org.junit.runner.JUnitCore.main(TestGluUnprojectDoubleNOUI.class.getName());
+ }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestGluUnprojectFloatNOUI.java b/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestGluUnprojectFloatNOUI.java
new file mode 100755
index 000000000..c26bd94c4
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestGluUnprojectFloatNOUI.java
@@ -0,0 +1,30 @@
+package com.jogamp.test.junit.jogl.glu;
+
+import javax.media.opengl.glu.GLU;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Julien Gouesse
+ */
+public class TestGluUnprojectFloatNOUI {
+
+
+ @Test
+ public void test(){
+ final GLU glu = new GLU();
+ final int[] pickedPoint = new int[]{400,300};
+ final float pickedPointDepth = 0;
+ final float[] sceneModelViewValues = new float[]{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
+ final float[] projectionValues = new float[]{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
+ final int[] viewport = new int[]{0,0,800,600};
+ final float[] objCoords = new float[]{Float.NaN,Float.NaN,Float.NaN};
+ glu.gluUnProject(pickedPoint[0], pickedPoint[1], pickedPointDepth, sceneModelViewValues, 0, projectionValues, 0, viewport, 0, objCoords, 0);
+ Assert.assertTrue(!Double.isNaN(objCoords[0])&&!Double.isNaN(objCoords[1])&&!Double.isNaN(objCoords[2]));
+ }
+
+ public static void main(String args[]) {
+ org.junit.runner.JUnitCore.main(TestGluUnprojectFloatNOUI.class.getName());
+ }
+}