Skip to content

Commit 8be9e01

Browse files
committed
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
1 parent c21b803 commit 8be9e01

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

libs/input/tests/InputVerifier_test.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@
1414
* limitations under the License.
1515
*/
1616

17+
#include <android/input.h>
18+
#include <android-base/result.h>
1719
#include <gtest/gtest.h>
20+
#include <input/Input.h>
1821
#include <input/InputVerifier.h>
1922
#include <string>
23+
#include <vector>
2024

2125
namespace android {
2226

@@ -48,7 +52,7 @@ TEST(InputVerifierTest, ProcessSourceClassPointer) {
4852
AMOTION_EVENT_ACTION_DOWN,
4953
/*pointerCount=*/properties.size(), properties.data(),
5054
coords.data(), /*flags=*/0);
51-
ASSERT_TRUE(result.ok());
55+
ASSERT_RESULT_OK(result);
5256
}
5357

5458
} // namespace android

0 commit comments

Comments
 (0)