Fix GestureLayout tests

pull/482/head
Mattia Iavarone 6 years ago
parent 3341c49256
commit 2e6c4fbbb5
  1. 2
      cameraview/src/androidTest/java/com/otaliastudios/cameraview/gesture/PinchGestureLayoutTest.java
  2. 2
      cameraview/src/androidTest/java/com/otaliastudios/cameraview/gesture/ScrollGestureLayoutTest.java

@ -59,7 +59,7 @@ public class PinchGestureLayoutTest extends GestureLayoutTest<PinchGestureLayout
// How will this move our parameter? // How will this move our parameter?
float curr = 0.5f, min = 0f, max = 1f; float curr = 0.5f, min = 0f, max = 1f;
float newValue = layout.getValue(curr, min, max); float newValue = layout.computeValue(curr, min, max);
if (increasing) { if (increasing) {
assertTrue(newValue > curr); assertTrue(newValue > curr);
assertTrue(newValue <= max); assertTrue(newValue <= max);

@ -63,7 +63,7 @@ public class ScrollGestureLayoutTest extends GestureLayoutTest<ScrollGestureLayo
// How will this move our parameter? // How will this move our parameter?
float curr = 0.5f, min = 0f, max = 1f; float curr = 0.5f, min = 0f, max = 1f;
float newValue = layout.getValue(curr, min, max); float newValue = layout.computeValue(curr, min, max);
if (increasing) { if (increasing) {
assertTrue(newValue > curr); assertTrue(newValue > curr);
assertTrue(newValue <= max); assertTrue(newValue <= max);

Loading…
Cancel
Save