this test is even better now!
This commit is contained in:
parent
f4d36f32fa
commit
3f08833de2
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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_ */
|
||||
|
|
Loading…
Reference in New Issue