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

Commit 1c8a5a1b authored by Lais Andrade's avatar Lais Andrade
Browse files

Check primitive duration is positive for supported primitives

Fix: 203629838
Test: VtsHalVibratorTargetTest
Change-Id: I2e534f4589c9f594884385a99051c06f518103f7
parent 47551ec9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -417,6 +417,9 @@ TEST_P(VibratorAidl, GetPrimitiveDuration) {

            if (isPrimitiveSupported) {
                EXPECT_EQ(Status::EX_NONE, status.exceptionCode());
                if (primitive != CompositePrimitive::NOOP) {
                    ASSERT_GT(duration, 0) << toString(primitive) << " " << duration;
                }
            } else {
                EXPECT_TRUE(isUnknownOrUnsupported(status)) << status;
            }