Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8be9e018 authored by Harry Cutts's avatar Harry Cutts
Browse files

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
parent c21b8033
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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