Added tests for the `valid_load` function
This commit is contained in:
parent
861c5959d9
commit
b884517586
|
@ -54,3 +54,23 @@ TEST(test_load, PortAHandlerSuccess)
|
||||||
|
|
||||||
Load_HandleLoadPortA(4, 7);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue