Use EXPECT_LE instead of EXPECT_LT for some iio sensors that do not support runtime suspend.

Change-Id: I646511f9d6c62f2967cedf6a2abc19aa621ee073
This commit is contained in:
heqiang1008 thundersoft
2022-09-09 09:11:04 +00:00
parent 5195a49c3c
commit d6ef4fb700

View File

@@ -351,11 +351,11 @@ class SensorsHidlTestBase : public testing::TestWithParam<std::string> {
minDelayAverageInterval / 10);
// fastest rate sampling time is close to spec
EXPECT_LT(std::abs(minDelayAverageInterval - minSamplingPeriodInNs),
EXPECT_LE(std::abs(minDelayAverageInterval - minSamplingPeriodInNs),
minSamplingPeriodInNs / 10);
// slowest rate sampling time is close to spec
EXPECT_LT(std::abs(maxDelayAverageInterval - maxSamplingPeriodInNs),
EXPECT_LE(std::abs(maxDelayAverageInterval - maxSamplingPeriodInNs),
maxSamplingPeriodInNs / 10);
}