mirror of https://github.com/FOME-Tech/fome-fw.git
refactoring
This commit is contained in:
parent
72cc52add6
commit
dfc461f165
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include "unit_test_framework.h"
|
||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "error_handling.h"
|
#include "error_handling.h"
|
||||||
|
@ -43,18 +44,6 @@ void print(const char *fmt, ...);
|
||||||
|
|
||||||
#define chDbgCheck(x, y) chDbgAssert(x, y, NULL)
|
#define chDbgCheck(x, y) chDbgAssert(x, y, NULL)
|
||||||
|
|
||||||
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);
|
|
||||||
void assertFalse(float actual);
|
|
||||||
void assertFalseM(const char *msg, float actual);
|
|
||||||
|
|
||||||
|
|
||||||
#define systicks2ms(x) (0)
|
#define systicks2ms(x) (0)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -291,11 +291,6 @@ static void assertREqualsM(const char *msg, void *expected, void *actual) {
|
||||||
extern bool_t debugSignalExecutor;
|
extern bool_t debugSignalExecutor;
|
||||||
extern EnginePins enginePins;
|
extern EnginePins enginePins;
|
||||||
|
|
||||||
// todo: move method body here after merge
|
|
||||||
void assertEvent(const char *msg, int index, void *callback, efitime_t start, efitime_t momentX, long param);
|
|
||||||
void assertInjectorUpEvent(const char *msg, int eventIndex, efitime_t momentX, long injectorIndex);
|
|
||||||
void assertInjectorDownEvent(const char *msg, int eventIndex, efitime_t momentX, long injectorIndex);
|
|
||||||
|
|
||||||
void testRpmCalculator(void) {
|
void testRpmCalculator(void) {
|
||||||
printf("*************************************************** testRpmCalculator\r\n");
|
printf("*************************************************** testRpmCalculator\r\n");
|
||||||
timeNowUs = 0;
|
timeNowUs = 0;
|
||||||
|
|
|
@ -8,8 +8,21 @@
|
||||||
#ifndef UNIT_TEST_FRAMEWORK_H_
|
#ifndef UNIT_TEST_FRAMEWORK_H_
|
||||||
#define UNIT_TEST_FRAMEWORK_H_
|
#define UNIT_TEST_FRAMEWORK_H_
|
||||||
|
|
||||||
|
#include "efitime.h"
|
||||||
|
|
||||||
|
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);
|
||||||
|
void assertFalse(float actual);
|
||||||
|
void assertFalseM(const char *msg, float actual);
|
||||||
|
|
||||||
|
void assertEvent(const char *msg, int index, void *callback, efitime_t start, efitime_t momentX, long param);
|
||||||
|
void assertInjectorUpEvent(const char *msg, int eventIndex, efitime_t momentX, long injectorIndex);
|
||||||
|
void assertInjectorDownEvent(const char *msg, int eventIndex, efitime_t momentX, long injectorIndex);
|
||||||
|
|
||||||
#endif /* UNIT_TEST_FRAMEWORK_H_ */
|
#endif /* UNIT_TEST_FRAMEWORK_H_ */
|
||||||
|
|
Loading…
Reference in New Issue