diff --git a/unit_tests/main.cpp b/unit_tests/main.cpp index 5d74db2ad2..ca5908915e 100644 --- a/unit_tests/main.cpp +++ b/unit_tests/main.cpp @@ -53,7 +53,7 @@ efitick_t getTimeNowNt(void) { return getTimeNowUs() * US_TO_NT_MULTIPLIER; } -void assertEqualsM3(const char *prefix, const char *message, float expected, float actual, float EPS) { +void assertEqualsM5(const char *prefix, const char *message, float expected, float actual, float EPS) { char msg[100]; strcpy(msg, prefix); strcat(msg, message); @@ -72,11 +72,11 @@ void assertEqualsM3(const char *prefix, const char *message, float expected, flo } void assertEqualsM2(const char *msg, float expected, float actual, float eps) { - assertEqualsM3("", msg, expected, actual, eps); + assertEqualsM5("", msg, expected, actual, eps); } void assertEqualsM4(const char *prefix, const char *msg, float expected, float actual) { - assertEqualsM3(prefix, msg, expected, actual, 0.00001); + assertEqualsM5(prefix, msg, expected, actual, 0.00001); } void assertEqualsLM(const char *msg, long expected, long actual) { diff --git a/unit_tests/main.h b/unit_tests/main.h index 54bd87a333..a57f81a01a 100644 --- a/unit_tests/main.h +++ b/unit_tests/main.h @@ -46,6 +46,7 @@ void assertEqualsM2(const char *msg, float expected, float actual, float EPS); 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); +void assertEqualsM5(const char *prefix, const char *message, float expected, float actual, float EPS); void assertEquals(float expected, float actual); void assertTrue(float actual); void assertTrueM(const char *msg, float actual); diff --git a/unit_tests/test_trigger_decoder.cpp b/unit_tests/test_trigger_decoder.cpp index 02c0fc28fe..0b4270a845 100644 --- a/unit_tests/test_trigger_decoder.cpp +++ b/unit_tests/test_trigger_decoder.cpp @@ -224,8 +224,8 @@ void testTriggerDecoder2(const char *msg, engine_type_e type, int synchPointInde assertEqualsM("synchPointIndex", synchPointIndex, t->getTriggerShapeSynchPointIndex()); - assertEqualsM3(msg, " channel1duty", channel1duty, t->dutyCycle[0], 0.0001); - assertEqualsM3(msg, " channel2duty", channel2duty, t->dutyCycle[1], 0.0001); + assertEqualsM5(msg, " channel1duty", channel1duty, t->dutyCycle[0], 0.0001); + assertEqualsM5(msg, " channel2duty", channel2duty, t->dutyCycle[1], 0.0001); } static void testTriggerDecoder3(const char *msg, engine_type_e type, int synchPointIndex, float channel1duty, float channel2duty, float expectedGap) {