summaryrefslogtreecommitdiff
path: root/src/tests/evas
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-05-09 09:25:14 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-05-09 09:25:14 +0100
commite0cf299ae5a98b294700bc04651a018fb779d0fc (patch)
tree9ff5fdef661fd4a688d374cd9d80bae488df7da0 /src/tests/evas
parent477bfd19ea43102cdfc8845343dd8a42ace08f59 (diff)
tests: resolve float comparison warnings
Summary: Depends on D11788 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11789
Diffstat (limited to 'src/tests/evas')
-rw-r--r--src/tests/evas/efl_canvas_animation.c2
-rw-r--r--src/tests/evas/evas_test_filters.c2
-rw-r--r--src/tests/evas/evas_test_text.c2
-rw-r--r--src/tests/evas/evas_test_textblock.c10
4 files changed, 8 insertions, 8 deletions
diff --git a/src/tests/evas/efl_canvas_animation.c b/src/tests/evas/efl_canvas_animation.c
index 19b47a6429..61fc264b69 100644
--- a/src/tests/evas/efl_canvas_animation.c
+++ b/src/tests/evas/efl_canvas_animation.c
@@ -38,7 +38,7 @@ EFL_START_TEST(efl_canvas_animation_default_value)
38{ 38{
39 Efl_Canvas_Animation *animation = efl_new(EFL_CANVAS_ANIMATION_CLASS); 39 Efl_Canvas_Animation *animation = efl_new(EFL_CANVAS_ANIMATION_CLASS);
40 40
41 fail_if(efl_animation_duration_get(animation) == 0.0); 41 fail_if(EINA_DBL_EQ(efl_animation_duration_get(animation), 0.0));
42} 42}
43EFL_END_TEST 43EFL_END_TEST
44 44
diff --git a/src/tests/evas/evas_test_filters.c b/src/tests/evas/evas_test_filters.c
index f77e16a671..87c09e0961 100644
--- a/src/tests/evas/evas_test_filters.c
+++ b/src/tests/evas/evas_test_filters.c
@@ -448,7 +448,7 @@ EFL_START_TEST(evas_filter_state_test)
448 "state render test failed: %p (%#x)", pixels, pixels ? *pixels : 0); 448 "state render test failed: %p (%#x)", pixels, pixels ? *pixels : 0);
449 449
450 efl_gfx_filter_state_get(to, &s1, &v1, &s2, &v2, &p); 450 efl_gfx_filter_state_get(to, &s1, &v1, &s2, &v2, &p);
451 fail_unless(strequal(s1, "state1") && strequal(s2, "state2") && (v1 == 0.0) && (v2 == 1.0) && (p == 0.5), 451 fail_unless(strequal(s1, "state1") && strequal(s2, "state2") && EINA_DBL_EQ(v1, 0.0) && EINA_DBL_EQ(v2, 1.0) && EINA_DBL_EQ(p, 0.5),
452 "got: %s %f %s %f %f", s1, v1, s2, v2, p); 452 "got: %s %f %s %f %f", s1, v1, s2, v2, p);
453 453
454 /* data test */ 454 /* data test */
diff --git a/src/tests/evas/evas_test_text.c b/src/tests/evas/evas_test_text.c
index 929c88ddab..6f29807216 100644
--- a/src/tests/evas/evas_test_text.c
+++ b/src/tests/evas/evas_test_text.c
@@ -265,7 +265,7 @@ EFL_START_TEST(evas_text_ellipsis)
265 _test_ellipsis(to, buf, font, size, 1.0); 265 _test_ellipsis(to, buf, font, size, 1.0);
266 266
267 /* Check ellipsis value with NULL */ 267 /* Check ellipsis value with NULL */
268 fail_if(evas_object_text_ellipsis_get(NULL) != -1.0); 268 fail_if(!EINA_DBL_EQ(evas_object_text_ellipsis_get(NULL), -1.0));
269 269
270 END_TEXT_TEST(); 270 END_TEXT_TEST();
271} 271}
diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c
index 620ce70b7b..a0b68ac90a 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -3826,15 +3826,15 @@ EFL_START_TEST(evas_textblock_set_get)
3826 fail_if(strcmp(evas_object_textblock_replace_char_get(tb), "ש")); 3826 fail_if(strcmp(evas_object_textblock_replace_char_get(tb), "ש"));
3827 3827
3828 evas_object_textblock_valign_set(tb, -1.0); 3828 evas_object_textblock_valign_set(tb, -1.0);
3829 fail_if(evas_object_textblock_valign_get(tb) != 0.0); 3829 fail_if(EINA_DBL_NONZERO(evas_object_textblock_valign_get(tb)));
3830 evas_object_textblock_valign_set(tb, 0.0); 3830 evas_object_textblock_valign_set(tb, 0.0);
3831 fail_if(evas_object_textblock_valign_get(tb) != 0.0); 3831 fail_if(EINA_DBL_NONZERO(evas_object_textblock_valign_get(tb)));
3832 evas_object_textblock_valign_set(tb, 0.432); 3832 evas_object_textblock_valign_set(tb, 0.432);
3833 fail_if(evas_object_textblock_valign_get(tb) != 0.432); 3833 fail_if(!EINA_DBL_EQ(evas_object_textblock_valign_get(tb), 0.432));
3834 evas_object_textblock_valign_set(tb, 1.0); 3834 evas_object_textblock_valign_set(tb, 1.0);
3835 fail_if(evas_object_textblock_valign_get(tb) != 1.0); 3835 fail_if(!EINA_DBL_EQ(evas_object_textblock_valign_get(tb), 1.0));
3836 evas_object_textblock_valign_set(tb, 1.5); 3836 evas_object_textblock_valign_set(tb, 1.5);
3837 fail_if(evas_object_textblock_valign_get(tb) != 1.0); 3837 fail_if(!EINA_DBL_EQ(evas_object_textblock_valign_get(tb), 1.0));
3838 3838
3839 evas_object_textblock_bidi_delimiters_set(tb, ",.|"); 3839 evas_object_textblock_bidi_delimiters_set(tb, ",.|");
3840 fail_if(strcmp(evas_object_textblock_bidi_delimiters_get(tb), ",.|")); 3840 fail_if(strcmp(evas_object_textblock_bidi_delimiters_get(tb), ",.|"));