Native test for VelocityTracker
Adding VelocityTracker native tests for checking
the velocity output for certain inputs. Adding two types of
test cases:
1) Generated manually. These are simple test cases like linear
motion, repeated coordinates, etc.
2) Generated by recording an actual fling. Used
to reproduce the swordfish fling bug referenced below.
3) Recorded flings on sailfish for additional tests.
Currently, the make target for the test is
libinput_tests_VelocityTracker_test.
Bug: 35412046
Test: adb shell /data/nativetest64/libinput_tests/VelocityTracker_test
Change-Id: I2f71100f8dc6216667b0698270a27c98cd401565
diff --git a/libs/input/VelocityTracker.cpp b/libs/input/VelocityTracker.cpp
index a914408..f5b896b 100644
--- a/libs/input/VelocityTracker.cpp
+++ b/libs/input/VelocityTracker.cpp
@@ -75,7 +75,9 @@
str += " ]";
return str;
}
+#endif
+#if DEBUG_STRATEGY
static std::string matrixToString(const float* a, uint32_t m, uint32_t n, bool rowMajor) {
std::string str;
str = "[";