summaryrefslogtreecommitdiffstats
path: root/libs/input/tests
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-05-06 11:31:37 +0100
committerNarayan Kamath <narayan@google.com>2014-05-06 11:42:16 +0100
commitb8290c2642ec7a0cb8a1703a7e1e8958a6a5f9f3 (patch)
treee706178a4a9b01bb68adbe15aadddced96d9973d /libs/input/tests
parent4522f5749d46adec0189c8dfe7f8e80b9ff4ce7e (diff)
downloadframeworks_native-b8290c2642ec7a0cb8a1703a7e1e8958a6a5f9f3.zip
frameworks_native-b8290c2642ec7a0cb8a1703a7e1e8958a6a5f9f3.tar.gz
frameworks_native-b8290c2642ec7a0cb8a1703a7e1e8958a6a5f9f3.tar.bz2
Fix InputEvent_test.
Axis 0 sets the MSB and Axis 63 sets the LSB, and not the other way round like the test expects. This was broken by commit 38dcdff3087f01 which moved this code over to using BitSet. Change-Id: I63a72abe7ce14720b0bf26e5f6d651bb42452f79
Diffstat (limited to 'libs/input/tests')
-rw-r--r--libs/input/tests/InputEvent_test.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/input/tests/InputEvent_test.cpp b/libs/input/tests/InputEvent_test.cpp
index 78ea98e..9105ae5 100644
--- a/libs/input/tests/InputEvent_test.cpp
+++ b/libs/input/tests/InputEvent_test.cpp
@@ -53,8 +53,8 @@ TEST_F(PointerCoordsTest, AxisValues) {
// Set first axis.
ASSERT_EQ(OK, coords.setAxisValue(1, 5));
- ASSERT_EQ(0x00000002ULL, coords.bits);
ASSERT_EQ(5, coords.values[0]);
+ ASSERT_EQ(0x4000000000000000ULL, coords.bits);
ASSERT_EQ(0, coords.getAxisValue(0))
<< "getAxisValue should return zero because axis is not present";
@@ -63,7 +63,7 @@ TEST_F(PointerCoordsTest, AxisValues) {
// Set an axis with a higher id than all others. (appending value at the end)
ASSERT_EQ(OK, coords.setAxisValue(3, 2));
- ASSERT_EQ(0x0000000aULL, coords.bits);
+ ASSERT_EQ(0x5000000000000000ULL, coords.bits);
ASSERT_EQ(5, coords.values[0]);
ASSERT_EQ(2, coords.values[1]);
@@ -78,7 +78,7 @@ TEST_F(PointerCoordsTest, AxisValues) {
// Set an axis with an id lower than all others. (prepending value at beginning)
ASSERT_EQ(OK, coords.setAxisValue(0, 4));
- ASSERT_EQ(0x0000000bULL, coords.bits);
+ ASSERT_EQ(0xd000000000000000ULL, coords.bits);
ASSERT_EQ(4, coords.values[0]);
ASSERT_EQ(5, coords.values[1]);
ASSERT_EQ(2, coords.values[2]);
@@ -94,7 +94,7 @@ TEST_F(PointerCoordsTest, AxisValues) {
// Set an axis with an id between the others. (inserting value in the middle)
ASSERT_EQ(OK, coords.setAxisValue(2, 1));
- ASSERT_EQ(0x0000000fULL, coords.bits);
+ ASSERT_EQ(0xf000000000000000ULL, coords.bits);
ASSERT_EQ(4, coords.values[0]);
ASSERT_EQ(5, coords.values[1]);
ASSERT_EQ(1, coords.values[2]);
@@ -111,7 +111,7 @@ TEST_F(PointerCoordsTest, AxisValues) {
// Set an existing axis value in place.
ASSERT_EQ(OK, coords.setAxisValue(1, 6));
- ASSERT_EQ(0x0000000fULL, coords.bits);
+ ASSERT_EQ(0xf000000000000000ULL, coords.bits);
ASSERT_EQ(4, coords.values[0]);
ASSERT_EQ(6, coords.values[1]);
ASSERT_EQ(1, coords.values[2]);