From 3f08833de2887981d36b0c5d153541102e78d801 Mon Sep 17 00:00:00 2001 From: rusefi Date: Fri, 31 Jan 2020 13:45:15 -0500 Subject: [PATCH] this test is even better now! --- unit_tests/tests/test_cam_vtt_input.cpp | 3 +++ unit_tests/unit_test_framework.h | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/unit_tests/tests/test_cam_vtt_input.cpp b/unit_tests/tests/test_cam_vtt_input.cpp index 7256a484c0..c107674d77 100644 --- a/unit_tests/tests/test_cam_vtt_input.cpp +++ b/unit_tests/tests/test_cam_vtt_input.cpp @@ -135,10 +135,13 @@ TEST(sensors, testNB2CamInput) { hwHandleVvtCamSignal(TV_RISE, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX); ASSERT_FLOAT_EQ(0, engine->triggerCentral.getVVTPosition()); + ASSERT_EQ(5, engine->triggerCentral.triggerState.getTotalRevolutionCounter()); eth.moveTimeForwardUs(MS2US(130)); // this third important front would give us first comparison between two real gaps hwHandleVvtCamSignal(TV_RISE, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX); ASSERT_NEAR(-46, engine->triggerCentral.getVVTPosition(), EPS3D); + // actually position based on VVT! + ASSERT_EQ(8, engine->triggerCentral.triggerState.getTotalRevolutionCounter()); } diff --git a/unit_tests/unit_test_framework.h b/unit_tests/unit_test_framework.h index d117e194da..fea8f1ce38 100644 --- a/unit_tests/unit_test_framework.h +++ b/unit_tests/unit_test_framework.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef UNIT_TEST_FRAMEWORK_H_ -#define UNIT_TEST_FRAMEWORK_H_ +#pragma once #include "engine.h" #include "gtest/gtest.h" @@ -32,4 +31,3 @@ void assertEqualsM(const char *msg, float expected, float actual); void assertEqualsLM(const char *msg, long expected, long actual); void assertEqualsM4(const char *prefix, const char *msg, float expected, float actual); -#endif /* UNIT_TEST_FRAMEWORK_H_ */