summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Harry Cutts <hcutts@google.com> 2025-01-15 07:41:13 -0800
committer Harry Cutts <hcutts@google.com> 2025-01-15 07:41:13 -0800
commit8be9e0184fa905e7587aa80fa6ae82d870dece83 (patch)
tree0e33a02511fc90ded2269857e823a1c5c7eff23c
parentc21b803371da61be373360e942239c8cc8ab2949 (diff)
input: Use ASSERT_RESULT_OK in InputVerifierTest
This provides a nicer error message if the result is not OK, by including the error message. Also add a few headers to follow Include What You Use. Bug: 245989146 Change-Id: I37353ec92b110071213b941700fdf5e3b062890d Test: TreeHugger Flag: TEST_ONLY
-rw-r--r--libs/input/tests/InputVerifier_test.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/input/tests/InputVerifier_test.cpp b/libs/input/tests/InputVerifier_test.cpp
index e2eb08096b..5bb1d56040 100644
--- a/libs/input/tests/InputVerifier_test.cpp
+++ b/libs/input/tests/InputVerifier_test.cpp
@@ -14,9 +14,13 @@
* limitations under the License.
*/
+#include <android/input.h>
+#include <android-base/result.h>
#include <gtest/gtest.h>
+#include <input/Input.h>
#include <input/InputVerifier.h>
#include <string>
+#include <vector>
namespace android {
@@ -48,7 +52,7 @@ TEST(InputVerifierTest, ProcessSourceClassPointer) {
AMOTION_EVENT_ACTION_DOWN,
/*pointerCount=*/properties.size(), properties.data(),
coords.data(), /*flags=*/0);
- ASSERT_TRUE(result.ok());
+ ASSERT_RESULT_OK(result);
}
} // namespace android