summaryrefslogtreecommitdiff
path: root/test/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.c')
-rw-r--r--test/test.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test.c b/test/test.c
index 59e1cd1..8623180 100644
--- a/test/test.c
+++ b/test/test.c
@@ -1,3 +1,4 @@
+#include <math.h>
#include <re.h>
#include <baresip.h>
#include "test.h"
@@ -35,3 +36,9 @@ int re_main_timeout(uint32_t timeout_ms)
tmr_cancel(&tmr);
return err;
}
+
+
+bool test_cmp_double(double a, double b, double precision)
+{
+ return fabs(a - b) < precision;
+}