reducing crazy in unit tests

This commit is contained in:
Andrey 2021-10-01 23:53:22 -04:00
parent 2a2722c3cc
commit 3da054c6e7
1 changed files with 9 additions and 2 deletions

View File

@ -91,9 +91,16 @@ TEST(ignition, trailingSpark) {
// Fire trigger rise - should schedule ignition firings
eth.fireRise(20);
eth.clearQueue();
eth.moveTimeForwardMs(1);
eth.executeActions();
// Primary and secondary coils should be low
// Primary goes low, scheduling trailing
EXPECT_EQ(enginePins.coils[0].getLogicValue(), false);
EXPECT_EQ(enginePins.trailingCoils[0].getLogicValue(), true);
eth.moveTimeForwardMs(1);
eth.executeActions();
// secondary coils should be low
EXPECT_EQ(enginePins.trailingCoils[0].getLogicValue(), false);
}