commit | f1b4dd3f1d98e09dc595862e1a707f02d02dd19b | [log] [tgz] |
---|---|---|
author | Lais Andrade <lsandrade@google.com> | Wed Nov 03 16:47:32 2021 +0000 |
committer | chasewu <chasewu@google.com> | Mon May 16 16:14:46 2022 +0800 |
tree | 041774c1e368f040fc1d286aae839be49a23766b | |
parent | cff8c9fb9e78cd29ce33419ef317858fbac5a910 [diff] |
Check primitive duration is positive for supported primitives Bug: 203629838 Fix: 231486866 Test: VtsHalVibratorTargetTest Signed-off-by: chasewu <chasewu@google.com> Change-Id: I2e534f4589c9f594884385a99051c06f518103f7 Merged-In: I2e534f4589c9f594884385a99051c06f518103f7
diff --git a/vibrator/aidl/vts/VtsHalVibratorTargetTest.cpp b/vibrator/aidl/vts/VtsHalVibratorTargetTest.cpp index 5251529..3841715 100644 --- a/vibrator/aidl/vts/VtsHalVibratorTargetTest.cpp +++ b/vibrator/aidl/vts/VtsHalVibratorTargetTest.cpp
@@ -417,6 +417,9 @@ 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; }