From b3bdf0535c895f610588807976aeca673dba059b Mon Sep 17 00:00:00 2001 From: ramindani Date: Wed, 12 Jan 2022 18:27:05 +0000 Subject: [PATCH] ASSERT error check in brightness test Without ASSERT the next call to take the first element will crash the instrumentation for the tests. BUG: 210151839 Test: atest VtsHalGraphicsComposer3_TargetTest Change-Id: I2c78b9130661e543e62138c064ab15dd79180920 --- .../vts/functional/VtsHalGraphicsComposer3_TargetTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/VtsHalGraphicsComposer3_TargetTest.cpp b/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/VtsHalGraphicsComposer3_TargetTest.cpp index a591aaa67d..63a6b86696 100644 --- a/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/VtsHalGraphicsComposer3_TargetTest.cpp +++ b/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/VtsHalGraphicsComposer3_TargetTest.cpp @@ -1499,7 +1499,7 @@ TEST_P(GraphicsComposerAidlCommandTest, SetDisplayBrightness) { execute(); { const auto errors = mReader.takeErrors(); - EXPECT_EQ(1, errors.size()); + ASSERT_EQ(1, errors.size()); EXPECT_EQ(IComposerClient::EX_BAD_PARAMETER, errors[0].errorCode); } @@ -1507,7 +1507,7 @@ TEST_P(GraphicsComposerAidlCommandTest, SetDisplayBrightness) { execute(); { const auto errors = mReader.takeErrors(); - EXPECT_EQ(1, errors.size()); + ASSERT_EQ(1, errors.size()); EXPECT_EQ(IComposerClient::EX_BAD_PARAMETER, errors[0].errorCode); } }