Added tests for the `valid_load` function

This commit is contained in:
jakeg00dwin 2024-09-20 18:42:35 -07:00
parent 861c5959d9
commit b884517586
1 changed files with 20 additions and 0 deletions

View File

@ -54,3 +54,23 @@ TEST(test_load, PortAHandlerSuccess)
Load_HandleLoadPortA(4, 7);
}
TEST(test_load, HighThreshValid)
{
bool result = valid_load(HIGHTHRESH);
CHECK_TRUE(!result);
result = valid_load(HIGHTHRESH - 1);
CHECK_TRUE(result);
}
TEST(test_load, LowThreshValid)
{
bool result = valid_load(LOWTHRESH);
CHECK_TRUE(!result);
result = valid_load(LOWTHRESH + 1);
CHECK_TRUE(result);
}