Added tests for the is_below_target() function.

This commit is contained in:
jakeg00dwin 2024-09-23 12:01:34 -07:00
parent 17f2df7d9d
commit fd6daaf02f

View file

@ -74,3 +74,16 @@ TEST(test_load, LowThreshValid)
CHECK_TRUE(result);
}
TEST(test_load, BelowTargetValid)
{
bool result = is_below_target(HYSTERESIS - 1);
CHECK_TRUE(result);
result = is_below_target(HYSTERESIS);
CHECK_FALSE(result);
result = is_below_target(HYSTERESIS + 1);
CHECK_FALSE(result);
}