mirror of
https://github.com/Karaka-Management/cOMS.git
synced 2026-02-13 08:58:40 +00:00
Update TestUtils.h
This commit is contained in:
parent
78f31ef6c2
commit
1b90610d62
|
|
@ -11,7 +11,7 @@
|
||||||
#define UTILS_TEST_UTILS_H
|
#define UTILS_TEST_UTILS_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include "MathUtils.h"
|
||||||
|
|
||||||
#define ASSERT_EQUALS(a, b, t1, t2) \
|
#define ASSERT_EQUALS(a, b, t1, t2) \
|
||||||
({ __typeof__ (a) _a = (a); \
|
({ __typeof__ (a) _a = (a); \
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
#define ASSERT_EQUALS_WITH_DELTA(a, b, delta, t1, t2) \
|
#define ASSERT_EQUALS_WITH_DELTA(a, b, delta, t1, t2) \
|
||||||
({ __typeof__ (a) _a = (a); \
|
({ __typeof__ (a) _a = (a); \
|
||||||
__typeof__ (b) _b = (b); \
|
__typeof__ (b) _b = (b); \
|
||||||
if (abs(_a - _b) <= delta) { \
|
if (oms_abs(_a - _b) <= delta) { \
|
||||||
printf("."); \
|
printf("."); \
|
||||||
} else { \
|
} else { \
|
||||||
printf("F"); \
|
printf("F"); \
|
||||||
|
|
@ -37,4 +37,4 @@
|
||||||
return 0; } \
|
return 0; } \
|
||||||
})
|
})
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user