Added more port b tests

This commit is contained in:
jakeg00dwin 2024-10-18 22:15:22 -07:00
parent c2a5e94bae
commit 8d7af1d678
1 changed files with 15 additions and 4 deletions

View File

@ -222,13 +222,24 @@ TEST(test_load, PortBHandlerEnabledRisingEdgeHI)
Load_HandleLoadPortB(adc_pin, load_pin); Load_HandleLoadPortB(adc_pin, load_pin);
} }
TEST(test_load, PortBHandlerDisableFallingEdgeLO)
TEST(test_load, PortBHandlerDisabledAboveTarget)
{ {
MockADC_PushValue(HYSTERESIS_HI); //Start from the falling edge.
MockADC_PushValue(HYSTERESIS_LO + 1);
setup_adc_expectations(adc_pin); setup_adc_expectations(adc_pin);
expect_portb_disabled(load_pin, true); expect_portb_disabled(load_pin, false);
Load_HandleLoadPortB(adc_pin, load_pin);
}
TEST(test_load, PortBHandlerDisableFallingEdgeHI)
{
//Start from the falling edge.
MockADC_PushValue(HYSTERESIS_HI + 1);
setup_adc_expectations(adc_pin);
expect_portb_disabled(load_pin, false);
Load_HandleLoadPortB(adc_pin, load_pin); Load_HandleLoadPortB(adc_pin, load_pin);
} }