this test is even better now!

This commit is contained in:
rusefi 2020-01-31 13:45:15 -05:00
parent f6e7e8871a
commit d63dae9301
2 changed files with 4 additions and 3 deletions

View File

@ -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());
}

View File

@ -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_ */