Merge "Fix Sensors VTS asserts for sensor type strings" into rvc-dev am: abc7986d1a
am: 89519e760d
Change-Id: Icfd207a9895d831cf23dd1317b3de5bda26aa83c
This commit is contained in:
commit
f8c7ef21d0
1 changed files with 7 additions and 5 deletions
|
@ -367,11 +367,13 @@ TEST_P(SensorsHidlTest, SensorListValid) {
|
|||
<< s.sensorHandle << std::dec << " type=" << static_cast<int>(s.type)
|
||||
<< " name=" << s.name);
|
||||
|
||||
// Test non-empty type string
|
||||
EXPECT_FALSE(s.typeAsString.empty());
|
||||
|
||||
// Test defined type matches defined string type
|
||||
EXPECT_NO_FATAL_FAILURE(assertTypeMatchStringType(s.type, s.typeAsString));
|
||||
// Test type string non-empty only for private sensor types.
|
||||
if (s.type >= SensorTypeVersion::DEVICE_PRIVATE_BASE) {
|
||||
EXPECT_FALSE(s.typeAsString.empty());
|
||||
} else if (!s.typeAsString.empty()) {
|
||||
// Test type string matches framework string if specified for non-private types.
|
||||
EXPECT_NO_FATAL_FAILURE(assertTypeMatchStringType(s.type, s.typeAsString));
|
||||
}
|
||||
|
||||
// Test if all sensor has name and vendor
|
||||
EXPECT_FALSE(s.name.empty());
|
||||
|
|
Loading…
Reference in a new issue