changeset 7618:40389de6eea9

[Unit Tests] SwipeTest - small configuration and logic fix
author Elina Kleyman <elina.kleyman@oracle.com>
date Sun, 03 Aug 2014 17:57:04 +0300
parents 2821644c36f4
children 39c4399a3630
files tests/system/src/test/java/com/sun/glass/ui/monocle/SwipeTest.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/system/src/test/java/com/sun/glass/ui/monocle/SwipeTest.java	Sun Aug 03 16:35:24 2014 +0300
+++ b/tests/system/src/test/java/com/sun/glass/ui/monocle/SwipeTest.java	Sun Aug 03 17:57:04 2014 +0300
@@ -50,8 +50,8 @@
     }
 
     private static final SwipeTestCase[] TEST_CASES = {
-        new SwipeTestCase(200.0, Math.PI * 0.5, 10l, 100.0, 0.0, 200.0, "SWIPE_RIGHT"),
-        new SwipeTestCase(200.0, Math.PI * 0.5, 50l, 100.0, 0.0, 200.0, "SWIPE_RIGHT"),
+        new SwipeTestCase(200.0, Math.PI * 0.5, 10l, 1000.0, 0.0, 200.0, "SWIPE_RIGHT"),
+        new SwipeTestCase(200.0, Math.PI * 0.5, 50l, 1000.0, 0.0, 200.0, "SWIPE_RIGHT"),
 
         new SwipeTestCase(200.0, Math.PI * 0.4, 200l, 100.0, 0.0, 200.0, "SWIPE_RIGHT"),
         new SwipeTestCase(200.0, Math.PI * 0.5, 200l, 100.0, 0.0, 200.0, "SWIPE_RIGHT"),
@@ -193,7 +193,7 @@
                     do {
                         x += deltaX;
                         double y = amplitude * Math.sin(
-                                x / (Math.PI * 2.0 * wavelength));
+                                (x * Math.PI * 2.0) / wavelength);
                         double phi = Math.atan2(x, y);
                         double h = Math.sqrt(x * x + y * y);
                         double rotatedX = h * Math.cos(theta - phi);