migrating to googletest
This commit is contained in:
parent
6bc4470e05
commit
de2a196dbc
|
@ -153,7 +153,7 @@ void EngineTestHelper::assertInjectorDownEvent(const char *msg, int eventIndex,
|
|||
}
|
||||
|
||||
scheduling_s * EngineTestHelper::assertEvent5(TestExecutor *executor, const char *msg, int index, void *callback, efitime_t start, efitime_t momentX) {
|
||||
assertTrueM(msg, executor->size() > index);
|
||||
EXPECT_TRUE(executor->size() > index) << msg;
|
||||
scheduling_s *event = executor->getForUnitTest(index);
|
||||
assertEqualsM4(msg, " up/down", (void*)event->callback == (void*) callback, 1);
|
||||
assertEqualsM(msg, momentX, event->momentX - start);
|
||||
|
|
|
@ -45,10 +45,6 @@ void assertEqualsM(const char *msg, float expected, float actual) {
|
|||
assertEqualsM2(msg, expected, actual, 0.0001);
|
||||
}
|
||||
|
||||
void assertTrueM(const char *msg, float actual) {
|
||||
assertEqualsM(msg, TRUE, actual);
|
||||
}
|
||||
|
||||
void chDbgAssert(int c, char *msg, void *arg) {
|
||||
if (!c) {
|
||||
printf("assert failed: %s\r\n", msg);
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
#define EPS4D 0.0001
|
||||
#define EPS5D 0.00001
|
||||
|
||||
// todo: migrate to googletest, use EXPECT_* and ASSERT_*
|
||||
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 assertTrueM(const char *msg, float actual);
|
||||
|
||||
#endif /* UNIT_TEST_FRAMEWORK_H_ */
|
||||
|
|
Loading…
Reference in New Issue