From 0dfd5a99f8f45992223e8af6d0aef4a41d7347c5 Mon Sep 17 00:00:00 2001 From: loikki <loic.hausammann@protonmail.ch> Date: Thu, 15 Nov 2018 16:19:04 +0100 Subject: [PATCH] Fix outputlist test --- tests/testOutputList.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/testOutputList.c b/tests/testOutputList.c index cd9c62c3ab..dbc257aafd 100644 --- a/tests/testOutputList.c +++ b/tests/testOutputList.c @@ -36,9 +36,9 @@ const double time_values[Ntest] = { /* Expected values from file */ const double a_values[Ntest] = { - 0.5, - 0.1, 0.01, + 0.1, + 0.5, }; void test_no_cosmo(struct engine *e, char *name, int with_assert) { @@ -62,7 +62,7 @@ void test_no_cosmo(struct engine *e, char *name, int with_assert) { for (int i = 0; i < Ntest; i++) { /* Test last value */ if (with_assert) { - assert(abs(output_time - time_values[i]) < tol); + assert(fabs(output_time - time_values[i]) < tol); } /* Set current time */ @@ -98,7 +98,7 @@ void test_cosmo(struct engine *e, char *name, int with_assert) { for (int i = 0; i < Ntest; i++) { /* Test last value */ if (with_assert) { - assert(abs(output_time - a_values[i]) < tol); + assert(fabs(output_time - a_values[i]) < tol); } /* Set current time */ -- GitLab