tests: ecore: switch from fprintf to ck_asser_msg macro for custom error message
authorStefan Schmidt <stefan@osg.samsung.com>
Tue, 20 Sep 2016 10:43:29 +0000 (12:43 +0200)
committerStefan Schmidt <stefan@osg.samsung.com>
Tue, 20 Sep 2016 10:46:37 +0000 (12:46 +0200)
The ck_assert_msg macro can do this for us already in a failed case.

src/tests/ecore/ecore_test_timer.c

index fe802bc..63cb533 100644 (file)
@@ -183,8 +183,7 @@ _ecore_promise_quit(void *data, const Efl_Event *ev)
    double *start = success->value;
    double delta = ecore_loop_time_get() - *start;
 
-   fprintf(stderr, "Ecore promise timeout took %f (should be <= 0.02)\n", delta - 0.2);
-   fail_if(delta - 0.2 > 0.02);
+   ck_assert_msg(delta - 0.2 <= 0.02, "Ecore promise timeout took %f (should be <= 0.02)\n", delta - 0.2);
 
    *bob = EINA_TRUE;
    ecore_main_loop_quit();