mirror of https://github.com/rusefi/rusefi.git
this test is even better now!
This commit is contained in:
parent
f6e7e8871a
commit
d63dae9301
|
@ -135,10 +135,13 @@ TEST(sensors, testNB2CamInput) {
|
||||||
hwHandleVvtCamSignal(TV_RISE, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX);
|
hwHandleVvtCamSignal(TV_RISE, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
ASSERT_FLOAT_EQ(0, engine->triggerCentral.getVVTPosition());
|
ASSERT_FLOAT_EQ(0, engine->triggerCentral.getVVTPosition());
|
||||||
|
ASSERT_EQ(5, engine->triggerCentral.triggerState.getTotalRevolutionCounter());
|
||||||
|
|
||||||
eth.moveTimeForwardUs(MS2US(130));
|
eth.moveTimeForwardUs(MS2US(130));
|
||||||
// this third important front would give us first comparison between two real gaps
|
// this third important front would give us first comparison between two real gaps
|
||||||
hwHandleVvtCamSignal(TV_RISE, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX);
|
hwHandleVvtCamSignal(TV_RISE, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
ASSERT_NEAR(-46, engine->triggerCentral.getVVTPosition(), EPS3D);
|
ASSERT_NEAR(-46, engine->triggerCentral.getVVTPosition(), EPS3D);
|
||||||
|
// actually position based on VVT!
|
||||||
|
ASSERT_EQ(8, engine->triggerCentral.triggerState.getTotalRevolutionCounter());
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
* @author Andrey Belomutskiy, (c) 2012-2020
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef UNIT_TEST_FRAMEWORK_H_
|
#pragma once
|
||||||
#define UNIT_TEST_FRAMEWORK_H_
|
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "gtest/gtest.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 assertEqualsLM(const char *msg, long expected, long actual);
|
||||||
void assertEqualsM4(const char *prefix, const char *msg, float expected, float actual);
|
void assertEqualsM4(const char *prefix, const char *msg, float expected, float actual);
|
||||||
|
|
||||||
#endif /* UNIT_TEST_FRAMEWORK_H_ */
|
|
||||||
|
|
Loading…
Reference in New Issue