Synced the ZCD and ADCMock
This commit is contained in:
parent
01e4c43481
commit
f6aacf1dfa
|
@ -20,7 +20,8 @@
|
|||
void ZCD_Setup(void)
|
||||
{
|
||||
ADC_Init(ZCD_PIN);
|
||||
ADC_Enable(ZCD_PIN);
|
||||
ADC_SetPin(ZCD_PIN);
|
||||
ADC_Enable();
|
||||
}
|
||||
|
||||
bool ZCD_IsTriggered()
|
||||
|
|
|
@ -30,17 +30,16 @@ TEST_GROUP(test_MockADC)
|
|||
TEST(test_MockADC, ADC_InitExpects)
|
||||
{
|
||||
mock().expectOneCall("ADC_Init")
|
||||
.withUnsignedIntParameter("pin_num", 0x2);
|
||||
.withUnsignedIntParameter("pin_num", 7);
|
||||
|
||||
ADC_Init(0x2);
|
||||
ADC_Init(7);
|
||||
}
|
||||
|
||||
TEST(test_MockADC, ADC_EnableExpects)
|
||||
{
|
||||
mock().expectOneCall("ADC_Enable")
|
||||
.withUnsignedIntParameter("pin_num", 0x2);
|
||||
mock().expectOneCall("ADC_Enable");
|
||||
|
||||
ADC_Enable(0x2);
|
||||
ADC_Enable();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,8 +38,7 @@ static void ZCDSetupExpectations(void)
|
|||
mock().expectOneCall("ADC_Init")
|
||||
.withUnsignedIntParameter("pin_num", 7);
|
||||
|
||||
mock().expectOneCall("ADC_Enable")
|
||||
.withUnsignedIntParameter("pin_num", 7);
|
||||
mock().expectOneCall("ADC_Enable");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue