From d6464fffe715cdfa7b4c46f18eb5b60ffd93302f Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Sun, 19 Jul 2020 15:05:31 -0700 Subject: [PATCH] fix (#1620) --- unit_tests/tests/sensor/func_sensor.cpp | 2 +- unit_tests/tests/sensor/mock/mock_sensor.h | 8 +++----- unit_tests/tests/tests.mk | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/unit_tests/tests/sensor/func_sensor.cpp b/unit_tests/tests/sensor/func_sensor.cpp index b5551dd403..ed78e49300 100644 --- a/unit_tests/tests/sensor/func_sensor.cpp +++ b/unit_tests/tests/sensor/func_sensor.cpp @@ -40,7 +40,7 @@ TEST_F(SensorConverted, TestValid) { EXPECT_FALSE(s.Valid); } - dut.postRawValue(25, 0); + dut.postRawValue(25, getTimeNowNt()); // Should be valid, with a value of 25*2 = 50 { diff --git a/unit_tests/tests/sensor/mock/mock_sensor.h b/unit_tests/tests/sensor/mock/mock_sensor.h index c037194b00..287758046b 100644 --- a/unit_tests/tests/sensor/mock/mock_sensor.h +++ b/unit_tests/tests/sensor/mock/mock_sensor.h @@ -9,13 +9,11 @@ struct MockSensor final : public StoredValueSensor { } - void set(float value) - { - setValidValue(value, 0); + void set(float value) { + setValidValue(value, getTimeNowNt()); } - void invalidate() - { + void invalidate() { StoredValueSensor::invalidate(); } diff --git a/unit_tests/tests/tests.mk b/unit_tests/tests/tests.mk index 72d0c281a4..2051f8fc50 100644 --- a/unit_tests/tests/tests.mk +++ b/unit_tests/tests/tests.mk @@ -9,6 +9,7 @@ TESTS_SRC_CPP = \ tests/ignition_injection/injection_mode_transition.cpp \ tests/ignition_injection/test_startOfCrankingPrimingPulse.cpp \ tests/ignition_injection/test_miata_na6_real_cranking.cpp \ + tests/ignition_injection/test_multispark.cpp \ tests/ignition_injection/test_ignition_scheduling.cpp \ tests/ignition_injection/test_fuelCut.cpp \ tests/test_util.cpp \ @@ -37,7 +38,6 @@ TESTS_SRC_CPP = \ tests/test_accel_enrichment.cpp \ tests/test_tacho.cpp \ tests/test_gpiochip.cpp \ - tests/ignition_injection/test_multispark.cpp \ tests/test_deadband.cpp \ tests/sensor/basic_sensor.cpp \ tests/sensor/func_sensor.cpp \