Added missing test for the PORTB load handler function.
This commit is contained in:
parent
6990d2183e
commit
6696a45a80
|
@ -55,6 +55,22 @@ TEST(test_load, PortAHandlerSuccess)
|
||||||
Load_HandleLoadPortA(4, 7);
|
Load_HandleLoadPortA(4, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(test_load, PortBHandlerSuccess)
|
||||||
|
{
|
||||||
|
mock().expectOneCall("ADC_Init")
|
||||||
|
.withUnsignedIntParameter("pin_num", 4);
|
||||||
|
|
||||||
|
mock().expectOneCall("ADC_Enable");
|
||||||
|
mock().expectOneCall("ADC_ReadValue_Impl")
|
||||||
|
.withUnsignedIntParameter("pin_num", 4);
|
||||||
|
mock().expectOneCall("ADC_Disable");
|
||||||
|
mock().expectOneCall("RegEdit_ClearBit")
|
||||||
|
.withPointerParameter("reg", (void *) &PORTB.OUT)
|
||||||
|
.withUnsignedIntParameter("bit_num", 7);
|
||||||
|
|
||||||
|
Load_HandleLoadPortB(4, 7);
|
||||||
|
}
|
||||||
|
|
||||||
TEST(test_load, HighThreshValid)
|
TEST(test_load, HighThreshValid)
|
||||||
{
|
{
|
||||||
bool result = is_valid_load(HIGHTHRESH);
|
bool result = is_valid_load(HIGHTHRESH);
|
||||||
|
|
Loading…
Reference in New Issue