Skip to content

Commit

Permalink
Added const variables for min and max temperature limits
Browse files Browse the repository at this point in the history
  • Loading branch information
harinik124 committed Sep 20, 2024
1 parent 50fea4a commit e20cf94
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class TempModuleTest : public lzt::SysmanCtsClass {};
#define TEMPERATURE_TEST TempModuleTest
#endif // USE_ZESINIT

constexpr uint32_t invalidMaxTemperature = 125;
constexpr uint32_t invalidMinTemperature = 10;

TEST_F(
TEMPERATURE_TEST,
GivenComponentCountZeroWhenRetrievingTempHandlesThenNonZeroCountIsReturned) {
Expand Down Expand Up @@ -253,8 +256,8 @@ TEST_F(TEMPERATURE_TEST,
for (auto temp_handle : temp_handles) {
ASSERT_NE(nullptr, temp_handle);
auto temp = lzt::get_temp_state(temp_handle);
EXPECT_GT(temp, 10);
EXPECT_LT(temp, 125);
EXPECT_GT(temp, invalidMinTemperature);
EXPECT_LT(temp, invalidMaxTemperature);
}
}
}
Expand Down

0 comments on commit e20cf94

Please sign in to comment.