mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
thermal: fix VTS test for default implementation
Bug: 36097196 Test: vts Change-Id: I67cceb672a9ba67ae760019c0521d31544416882
This commit is contained in:
committed by
Daniel Cardenas
parent
4ccc3b0140
commit
3e4a4ce3ae
@@ -68,10 +68,12 @@ class ThermalHidlTest : public ::testing::VtsHalHidlTargetTestBase {
|
||||
if (i < baseSize_) {
|
||||
EXPECT_EQ(names_[i], temperatures[i].name.c_str());
|
||||
} else {
|
||||
// Names must be unique.
|
||||
EXPECT_EQ(names_.end(), std::find(names_.begin(), names_.end(),
|
||||
temperatures[i].name.c_str()));
|
||||
names_.push_back(temperatures[i].name);
|
||||
// Names must be unique only for known temperature types.
|
||||
if (temperatures[i].type != TemperatureType::UNKNOWN) {
|
||||
EXPECT_EQ(names_.end(), std::find(names_.begin(), names_.end(),
|
||||
temperatures[i].name.c_str()));
|
||||
}
|
||||
names_.push_back(temperatures[i].name);
|
||||
}
|
||||
}
|
||||
baseSize_ = size;
|
||||
@@ -88,10 +90,9 @@ class ThermalHidlTest : public ::testing::VtsHalHidlTargetTestBase {
|
||||
if (i < baseSize_) {
|
||||
EXPECT_EQ(names_[i], cpuUsages[i].name.c_str());
|
||||
} else {
|
||||
// Names must be unique.
|
||||
EXPECT_EQ(names_.end(), std::find(names_.begin(), names_.end(),
|
||||
cpuUsages[i].name.c_str()));
|
||||
names_.push_back(cpuUsages[i].name);
|
||||
// Names are not guaranteed to be unique because of the current
|
||||
// default Thermal HAL implementation.
|
||||
names_.push_back(cpuUsages[i].name);
|
||||
}
|
||||
}
|
||||
baseSize_ = size;
|
||||
|
||||
Reference in New Issue
Block a user