diff --git a/tests/load/test_load.cpp b/tests/load/test_load.cpp index c87ce54..c3589ba 100644 --- a/tests/load/test_load.cpp +++ b/tests/load/test_load.cpp @@ -55,6 +55,22 @@ TEST(test_load, PortAHandlerSuccess) 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) { bool result = is_valid_load(HIGHTHRESH);