Added two mock calls for the restore of the port state.

This commit is contained in:
jakeg00dwin 2024-07-26 18:19:05 -07:00
parent ce68803cef
commit 029b96aade
1 changed files with 8 additions and 0 deletions

View File

@ -128,6 +128,7 @@ TEST(test_ADC, ADC_EnableSuccessOnPin7)
TEST(test_ADC, ADC_EnableNothingOnHighPinNumbers)
{
mock().expectNoCall("RegEdit_SetBit");
ADC_Enable(8);
}
@ -142,6 +143,13 @@ TEST(test_ADC, ADC_DisablePasses)
.withPointerParameter("reg", (void *) &ADC0.CTRLA)
.withUnsignedIntParameter("bit_num", 0);
mock().expectOneCall("RegEdit_SetNum")
.withPointerParameter("reg", (void*) &PORTA.OUT)
.ignoreOtherParameters();
mock().expectOneCall("RegEdit_SetNum")
.withPointerParameter("reg", (void*) &PORTA.DIR)
.ignoreOtherParameters();
ADC_Disable();
}