From 097e871b197c2dadd18d090f4671d6b49e78dbd0 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sat, 2 Oct 2021 00:00:08 -0400 Subject: [PATCH] reducing crazy in unit tests --- .../ignition_injection/test_ignition_scheduling.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/unit_tests/tests/ignition_injection/test_ignition_scheduling.cpp b/unit_tests/tests/ignition_injection/test_ignition_scheduling.cpp index f49b6e5757..f6a3e3b752 100644 --- a/unit_tests/tests/ignition_injection/test_ignition_scheduling.cpp +++ b/unit_tests/tests/ignition_injection/test_ignition_scheduling.cpp @@ -83,14 +83,21 @@ TEST(ignition, trailingSpark) { // Fire trigger fall - should schedule ignition chargings (rising edges) eth.fireFall(20); - eth.clearQueue(); + eth.moveTimeForwardMs(18); + eth.executeActions(); - // Primary and secondary coils should be low + // Primary low, scheduling trailing EXPECT_EQ(enginePins.coils[0].getLogicValue(), true); + EXPECT_EQ(enginePins.trailingCoils[0].getLogicValue(), false); + + eth.moveTimeForwardMs(2); + eth.executeActions(); + + // and secondary coils should be low EXPECT_EQ(enginePins.trailingCoils[0].getLogicValue(), true); // Fire trigger rise - should schedule ignition firings - eth.fireRise(20); + eth.fireRise(0); eth.moveTimeForwardMs(1); eth.executeActions();