summaryrefslogtreecommitdiff
path: root/src/tests
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
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')
-rw-r--r--src/tests/ecore/ecore_test_animator.c4
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c46
-rw-r--r--src/tests/ecore/ecore_test_timer.c4
-rw-r--r--src/tests/ecore_con/ecore_con_test_ecore_con.c4
-rw-r--r--src/tests/eet/eet_test_common.c12
-rw-r--r--src/tests/eet/eet_test_data.c12
-rw-r--r--src/tests/eet/eet_test_file.c10
-rw-r--r--src/tests/eina/eina_test_bezier.c42
-rw-r--r--src/tests/eina/eina_test_quaternion.c24
-rw-r--r--src/tests/eina/eina_test_vector.c76
-rw-r--r--src/tests/elementary/efl_ui_test_config.c10
-rw-r--r--src/tests/elementary/efl_ui_test_spin_button.c4
-rw-r--r--src/tests/elementary/efl_ui_test_spotlight.c8
-rw-r--r--src/tests/elementary/spec/efl_test_gfx_arrangement.c4
-rw-r--r--src/tests/elementary/spec/efl_test_range_display.c30
-rw-r--r--src/tests/elementary/spec/efl_test_range_interactive.c8
-rw-r--r--src/tests/eolian/eolian_parsing.c2
-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
21 files changed, 162 insertions, 154 deletions
diff --git a/src/tests/ecore/ecore_test_animator.c b/src/tests/ecore/ecore_test_animator.c
index 271f9792ef..d69407bc1e 100644
--- a/src/tests/ecore/ecore_test_animator.c
+++ b/src/tests/ecore/ecore_test_animator.c
@@ -15,7 +15,7 @@ static Eina_Bool _anim_cb(void *data EINA_UNUSED, double pos)
15 fail_if(prev > pos); 15 fail_if(prev > pos);
16 prev = pos; 16 prev = pos;
17 17
18 if (pos == 1.0) 18 if (EINA_DBL_EQ(pos, 1.0))
19 ecore_main_loop_quit(); 19 ecore_main_loop_quit();
20 20
21 return EINA_TRUE; 21 return EINA_TRUE;
@@ -59,7 +59,7 @@ Eina_Bool test_pos(Ecore_Pos_Map posmap, double v1, double v2, double (*testmap)
59 return EINA_FALSE; 59 return EINA_FALSE;
60 } 60 }
61 } 61 }
62 fail_if(ecore_animator_pos_map(1.0, posmap, v1, v2) != 1.0); 62 fail_if(!EINA_DBL_EQ(ecore_animator_pos_map(1.0, posmap, v1, v2), 1.0));
63 63
64 return EINA_TRUE; 64 return EINA_TRUE;
65} 65}
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index 9c8a890945..6521871358 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -148,16 +148,16 @@ EFL_START_TEST(ecore_test_ecore_audio_obj_tone)
148 rate = ecore_audio_obj_in_samplerate_get(in); 148 rate = ecore_audio_obj_in_samplerate_get(in);
149 fail_if(rate != 44100); 149 fail_if(rate != 44100);
150 len = ecore_audio_obj_in_length_get(in); 150 len = ecore_audio_obj_in_length_get(in);
151 fail_if(len != 1); 151 fail_if(!EINA_DBL_EQ(len, 1));
152 152
153 ecore_audio_obj_in_length_set(in, 2.5); 153 ecore_audio_obj_in_length_set(in, 2.5);
154 len = ecore_audio_obj_in_length_get(in); 154 len = ecore_audio_obj_in_length_get(in);
155 fail_if(len != 2.5); 155 fail_if(!EINA_DBL_EQ(len, 2.5));
156 156
157 ecore_audio_obj_in_looped_set(in, EINA_TRUE); 157 ecore_audio_obj_in_looped_set(in, EINA_TRUE);
158 158
159 len = ecore_audio_obj_in_remaining_get(in); 159 len = ecore_audio_obj_in_remaining_get(in);
160 fail_if(len != 2.5); 160 fail_if(!EINA_DBL_EQ(len, 2.5));
161 161
162 freq = (intptr_t) efl_key_data_get(in, ECORE_AUDIO_ATTR_TONE_FREQ); 162 freq = (intptr_t) efl_key_data_get(in, ECORE_AUDIO_ATTR_TONE_FREQ);
163 fail_if(freq != 1000); 163 fail_if(freq != 1000);
@@ -173,28 +173,28 @@ EFL_START_TEST(ecore_test_ecore_audio_obj_tone)
173 ck_assert_str_eq(tmp, "bar"); 173 ck_assert_str_eq(tmp, "bar");
174 174
175 len = ecore_audio_obj_in_seek(in, 5.0, SEEK_SET); 175 len = ecore_audio_obj_in_seek(in, 5.0, SEEK_SET);
176 fail_if(len != -1); 176 fail_if(!EINA_DBL_EQ(len, -1));
177 177
178 len = ecore_audio_obj_in_seek(in, 1.0, 42); 178 len = ecore_audio_obj_in_seek(in, 1.0, 42);
179 fail_if(len != -1); 179 fail_if(!EINA_DBL_EQ(len, -1));
180 180
181 len = ecore_audio_obj_in_seek(in, 1.0, SEEK_SET); 181 len = ecore_audio_obj_in_seek(in, 1.0, SEEK_SET);
182 fail_if(len != 1.0); 182 fail_if(!EINA_DBL_EQ(len, 1.0));
183 183
184 len = ecore_audio_obj_in_remaining_get(in); 184 len = ecore_audio_obj_in_remaining_get(in);
185 fail_if(len != 1.5); 185 fail_if(!EINA_DBL_EQ(len, 1.5));
186 186
187 len = ecore_audio_obj_in_seek(in, 1.0, SEEK_CUR); 187 len = ecore_audio_obj_in_seek(in, 1.0, SEEK_CUR);
188 fail_if(len != 2.0); 188 fail_if(!EINA_DBL_EQ(len, 2.0));
189 189
190 len = ecore_audio_obj_in_remaining_get(in); 190 len = ecore_audio_obj_in_remaining_get(in);
191 fail_if(len != 0.5); 191 fail_if(!EINA_DBL_EQ(len, 0.5));
192 192
193 len = ecore_audio_obj_in_seek(in, -1.0, SEEK_END); 193 len = ecore_audio_obj_in_seek(in, -1.0, SEEK_END);
194 fail_if(len != 1.5); 194 fail_if(!EINA_DBL_EQ(len, 1.5));
195 195
196 len = ecore_audio_obj_in_remaining_get(in); 196 len = ecore_audio_obj_in_remaining_get(in);
197 fail_if(len != 1.0); 197 fail_if(!EINA_DBL_EQ(len, 1.0));
198 198
199 out = efl_add_ref(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 199 out = efl_add_ref(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
200 fail_if(!out); 200 fail_if(!out);
@@ -260,18 +260,18 @@ EFL_START_TEST(ecore_test_ecore_audio_obj_sndfile)
260 rate = ecore_audio_obj_in_samplerate_get(in); 260 rate = ecore_audio_obj_in_samplerate_get(in);
261 fail_if(rate != 44100); 261 fail_if(rate != 44100);
262 len = ecore_audio_obj_in_length_get(in); 262 len = ecore_audio_obj_in_length_get(in);
263 fail_if(len == 0); 263 fail_if(EINA_DBL_EQ(len, 0));
264 rem = ecore_audio_obj_in_remaining_get(in); 264 rem = ecore_audio_obj_in_remaining_get(in);
265 fail_if(len != rem); 265 fail_if(!EINA_DBL_EQ(len, rem));
266 266
267 fmt = ecore_audio_obj_format_get(in); 267 fmt = ecore_audio_obj_format_get(in);
268 fail_if(fmt != ECORE_AUDIO_FORMAT_OGG); 268 fail_if(fmt != ECORE_AUDIO_FORMAT_OGG);
269 269
270 len = ecore_audio_obj_in_seek(in, 0.5, SEEK_SET); 270 len = ecore_audio_obj_in_seek(in, 0.5, SEEK_SET);
271 fail_if(len != 0.5); 271 fail_if(!EINA_DBL_EQ(len, 0.5));
272 272
273 len = ecore_audio_obj_in_seek(in, 1.0, SEEK_CUR); 273 len = ecore_audio_obj_in_seek(in, 1.0, SEEK_CUR);
274 fail_if(len != 1.5); 274 fail_if(!EINA_DBL_EQ(len, 1.5));
275 275
276 len = ecore_audio_obj_in_seek(in, -1.5, SEEK_END); 276 len = ecore_audio_obj_in_seek(in, -1.5, SEEK_END);
277 fail_if(fabs(rem - 1 - len) > 0.6); 277 fail_if(fabs(rem - 1 - len) > 0.6);
@@ -467,22 +467,22 @@ EFL_START_TEST(ecore_test_ecore_audio_obj_in)
467 fail_if(!freed); 467 fail_if(!freed);
468 468
469 speed = ecore_audio_obj_in_speed_get(in); 469 speed = ecore_audio_obj_in_speed_get(in);
470 fail_if(speed != 1.0); 470 fail_if(!EINA_DBL_EQ(speed, 1.0));
471 471
472 ecore_audio_obj_in_speed_set(in, 2.5); 472 ecore_audio_obj_in_speed_set(in, 2.5);
473 473
474 speed = ecore_audio_obj_in_speed_get(in); 474 speed = ecore_audio_obj_in_speed_get(in);
475 fail_if(speed != 2.5); 475 fail_if(!EINA_DBL_EQ(speed, 2.5));
476 476
477 ecore_audio_obj_in_speed_set(in, 0); 477 ecore_audio_obj_in_speed_set(in, 0);
478 478
479 speed = ecore_audio_obj_in_speed_get(in); 479 speed = ecore_audio_obj_in_speed_get(in);
480 fail_if(speed != 0.2); 480 fail_if(!EINA_DBL_EQ(speed, 0.2));
481 481
482 ecore_audio_obj_in_speed_set(in, 10); 482 ecore_audio_obj_in_speed_set(in, 10);
483 483
484 speed = ecore_audio_obj_in_speed_get(in); 484 speed = ecore_audio_obj_in_speed_get(in);
485 fail_if(speed != 5.0); 485 fail_if(!EINA_DBL_EQ(speed, 5.0));
486 486
487 samplerate = ecore_audio_obj_in_samplerate_get(in); 487 samplerate = ecore_audio_obj_in_samplerate_get(in);
488 fail_if(samplerate != 0); 488 fail_if(samplerate != 0);
@@ -509,10 +509,10 @@ EFL_START_TEST(ecore_test_ecore_audio_obj_in)
509 fail_if(!looped); 509 fail_if(!looped);
510 510
511 length = ecore_audio_obj_in_length_get(in); 511 length = ecore_audio_obj_in_length_get(in);
512 fail_if(length != 0); 512 fail_if(!EINA_DBL_EQ(length, 0));
513 513
514 length = ecore_audio_obj_in_remaining_get(in); 514 length = ecore_audio_obj_in_remaining_get(in);
515 fail_if(length != -1); 515 fail_if(!EINA_DBL_EQ(length, -1));
516 516
517 memset(buf, 0xaa, 10); 517 memset(buf, 0xaa, 10);
518 read = ecore_audio_obj_in_read(in, buf, 10); 518 read = ecore_audio_obj_in_read(in, buf, 10);
@@ -573,11 +573,11 @@ EFL_START_TEST(ecore_test_ecore_audio_obj)
573 fail_if(!paused); 573 fail_if(!paused);
574 574
575 volume = ecore_audio_obj_volume_get(obj); 575 volume = ecore_audio_obj_volume_get(obj);
576 fail_if(volume != 1.0); 576 fail_if(!EINA_DBL_EQ(volume, 1.0));
577 577
578 ecore_audio_obj_volume_set(obj, 0.5); 578 ecore_audio_obj_volume_set(obj, 0.5);
579 volume = ecore_audio_obj_volume_get(obj); 579 volume = ecore_audio_obj_volume_get(obj);
580 fail_if(volume != 0.5); 580 fail_if(!EINA_DBL_EQ(volume, 0.5));
581 581
582 efl_unref(obj); 582 efl_unref(obj);
583 } 583 }
diff --git a/src/tests/ecore/ecore_test_timer.c b/src/tests/ecore/ecore_test_timer.c
index b295738e35..caaa643f55 100644
--- a/src/tests/ecore/ecore_test_timer.c
+++ b/src/tests/ecore/ecore_test_timer.c
@@ -60,11 +60,11 @@ _timer2_cb(void *data)
60 60
61 // check set new interval for timer 1 61 // check set new interval for timer 1
62 ecore_timer_interval_set(timer->timer1, timer->interval_1[timer->num_elem]); 62 ecore_timer_interval_set(timer->timer1, timer->interval_1[timer->num_elem]);
63 fail_if(timer->interval_1[timer->num_elem] != ecore_timer_interval_get(timer->timer1), "Error set new interval"); 63 fail_if(!EINA_DBL_EQ(timer->interval_1[timer->num_elem], ecore_timer_interval_get(timer->timer1)), "Error set new interval");
64 64
65 // check set new precision 65 // check set new precision
66 ecore_timer_precision_set(timer->precision[timer->num_elem]); 66 ecore_timer_precision_set(timer->precision[timer->num_elem]);
67 fail_if(timer->precision[timer->num_elem] != ecore_timer_precision_get(), "Error set new precision"); 67 fail_if(!EINA_DBL_EQ(timer->precision[timer->num_elem], ecore_timer_precision_get()), "Error set new precision");
68 68
69 // check removal timer 2 69 // check removal timer 2
70 if (ecore_timer_del(timer->timer2)) 70 if (ecore_timer_del(timer->timer2))
diff --git a/src/tests/ecore_con/ecore_con_test_ecore_con.c b/src/tests/ecore_con/ecore_con_test_ecore_con.c
index 45d5671afc..7a6333fa0e 100644
--- a/src/tests/ecore_con/ecore_con_test_ecore_con.c
+++ b/src/tests/ecore_con/ecore_con_test_ecore_con.c
@@ -43,7 +43,7 @@ _add(void *data, int type EINA_UNUSED, void *ev)
43 43
44 ecore_con_client_timeout_set(event->client, timeout_val); 44 ecore_con_client_timeout_set(event->client, timeout_val);
45 ret = ecore_con_client_timeout_get(event->client); 45 ret = ecore_con_client_timeout_get(event->client);
46 fail_if (ret != timeout_val); 46 fail_if (!EINA_DBL_EQ(ret, timeout_val));
47 47
48 ecore_con_client_data_set(event->client, cdata); 48 ecore_con_client_data_set(event->client, cdata);
49 del_data = ecore_con_client_data_get(event->client); 49 del_data = ecore_con_client_data_get(event->client);
@@ -243,7 +243,7 @@ void _ecore_con_server_client_tests(Ecore_Con_Type compl_type, const char *name,
243 243
244 ecore_con_server_timeout_set(server, timeout_val); 244 ecore_con_server_timeout_set(server, timeout_val);
245 timeout_ret = ecore_con_server_timeout_get(server); 245 timeout_ret = ecore_con_server_timeout_get(server);
246 fail_if (timeout_ret != timeout_val); 246 fail_if (!EINA_DBL_EQ(timeout_ret, timeout_val));
247 247
248 ret = ecore_con_server_port_get(server); 248 ret = ecore_con_server_port_get(server);
249 fail_if (ret != server_port); 249 fail_if (ret != server_port);
diff --git a/src/tests/eet/eet_test_common.c b/src/tests/eet/eet_test_common.c
index b9011c7be9..a9a510f0e9 100644
--- a/src/tests/eet/eet_test_common.c
+++ b/src/tests/eet/eet_test_common.c
@@ -549,22 +549,22 @@ eet_test_ex_check(Eet_Test_Ex_Type *stuff,
549 if (tmp > 0.00005) 549 if (tmp > 0.00005)
550 return 1; 550 return 1;
551 551
552 if (stuff->f2 != -(EET_TEST_FLOAT2 + offset)) 552 if (!EINA_FLT_EQ(stuff->f2, -(EET_TEST_FLOAT2 + offset)))
553 return 1; 553 return 1;
554 554
555 if (stuff->d2 != -(EET_TEST_DOUBLE2 + offset)) 555 if (!EINA_DBL_EQ(stuff->d2, -(EET_TEST_DOUBLE2 + offset)))
556 return 1; 556 return 1;
557 557
558 if (stuff->f3 != EET_TEST_FLOAT3 + offset) 558 if (!EINA_FLT_EQ(stuff->f3, EET_TEST_FLOAT3 + offset))
559 return 1; 559 return 1;
560 560
561 if (stuff->d3 != EET_TEST_DOUBLE3 + offset) 561 if (!EINA_DBL_EQ(stuff->d3, EET_TEST_DOUBLE3 + offset))
562 return 1; 562 return 1;
563 563
564 if (stuff->f4 != EET_TEST_FLOAT2 + offset) 564 if (!EINA_FLT_EQ(stuff->f4, EET_TEST_FLOAT2 + offset))
565 return 1; 565 return 1;
566 566
567 if (stuff->d4 != EET_TEST_DOUBLE2 + offset) 567 if (!EINA_DBL_EQ(stuff->d4, EET_TEST_DOUBLE2 + offset))
568 return 1; 568 return 1;
569 569
570 if (stuff->uc != EET_TEST_CHAR + offset) 570 if (stuff->uc != EET_TEST_CHAR + offset)
diff --git a/src/tests/eet/eet_test_data.c b/src/tests/eet/eet_test_data.c
index ae5d013fcc..244d71373f 100644
--- a/src/tests/eet/eet_test_data.c
+++ b/src/tests/eet/eet_test_data.c
@@ -544,11 +544,11 @@ EFL_START_TEST(eet_test_data_fp)
544 fail_if(build->f1 != eina_f32p32_int_from(1)); 544 fail_if(build->f1 != eina_f32p32_int_from(1));
545 fail_if(build->f0 != 0); 545 fail_if(build->f0 != 0);
546 546
547 fail_if(convert->fp32 != 1.125); 547 fail_if(!EINA_DBL_EQ(convert->fp32, 1.125));
548 fail_if(convert->fp16 != 2000); 548 fail_if(!EINA_DBL_EQ(convert->fp16, 2000));
549 fail_if(convert->fp8 != 125); 549 fail_if(!EINA_DBL_EQ(convert->fp8, 125));
550 fail_if(convert->f1 != 1); 550 fail_if(!EINA_DBL_EQ(convert->f1, 1));
551 fail_if(convert->f0 != 0); 551 fail_if(!EINA_DBL_EQ(convert->f0, 0));
552 552
553} 553}
554EFL_END_TEST 554EFL_END_TEST
@@ -774,7 +774,7 @@ EFL_START_TEST(eet_test_data_hash_value)
774 774
775 val = (Eina_Value *)eina_hash_find(h->hash, "val/double"); 775 val = (Eina_Value *)eina_hash_find(h->hash, "val/double");
776 eina_value_get(val, &d); 776 eina_value_get(val, &d);
777 fail_if((!val) || (d != EET_TEST_DOUBLE)); 777 fail_if((!val) || (!EINA_DBL_EQ(d, EET_TEST_DOUBLE)));
778 778
779 val = (Eina_Value *)eina_hash_find(h->hash, "val/string"); 779 val = (Eina_Value *)eina_hash_find(h->hash, "val/string");
780 eina_value_get(val, &s); 780 eina_value_get(val, &s);
diff --git a/src/tests/eet/eet_test_file.c b/src/tests/eet/eet_test_file.c
index 6d77a7d817..9423dc8aed 100644
--- a/src/tests/eet/eet_test_file.c
+++ b/src/tests/eet/eet_test_file.c
@@ -435,11 +435,11 @@ EFL_START_TEST(eet_test_file_fp)
435 fail_if(build->f1 != eina_f32p32_int_from(1)); 435 fail_if(build->f1 != eina_f32p32_int_from(1));
436 fail_if(build->f0 != 0); 436 fail_if(build->f0 != 0);
437 437
438 fail_if(convert->fp32 != 1.125); 438 fail_if(!EINA_DBL_EQ(convert->fp32, 1.125));
439 fail_if(convert->fp16 != 2000); 439 fail_if(!EINA_DBL_EQ(convert->fp16, 2000));
440 fail_if(convert->fp8 != 125); 440 fail_if(!EINA_DBL_EQ(convert->fp8, 125));
441 fail_if(convert->f1 != 1); 441 fail_if(!EINA_DBL_EQ(convert->f1, 1));
442 fail_if(convert->f0 != 0); 442 fail_if(!EINA_DBL_EQ(convert->f0, 0));
443 443
444 eet_close(ef); 444 eet_close(ef);
445 445
diff --git a/src/tests/eina/eina_test_bezier.c b/src/tests/eina/eina_test_bezier.c
index 36de00dc13..f07bb5f5c2 100644
--- a/src/tests/eina/eina_test_bezier.c
+++ b/src/tests/eina/eina_test_bezier.c
@@ -42,14 +42,14 @@ EFL_START_TEST(eina_bezier_test_values)
42 &cx1, &cy1, 42 &cx1, &cy1,
43 &cx2, &cy2, 43 &cx2, &cy2,
44 &ex, &ey); 44 &ex, &ey);
45 fail_if(sx != 1 || 45 fail_if(!EINA_DBL_EQ(sx, 1) ||
46 sy != 2 || 46 !EINA_DBL_EQ(sy, 2) ||
47 cx1 != 3 || 47 !EINA_DBL_EQ(cx1, 3) ||
48 cy1 != 4 || 48 !EINA_DBL_EQ(cy1, 4) ||
49 cx2 != 5 || 49 !EINA_DBL_EQ(cx2, 5) ||
50 cy2 != 6 || 50 !EINA_DBL_EQ(cy2, 6) ||
51 ex != 7 || 51 !EINA_DBL_EQ(ex, 7) ||
52 ey != 8); 52 !EINA_DBL_EQ(ey, 8));
53} 53}
54EFL_END_TEST 54EFL_END_TEST
55 55
@@ -65,7 +65,7 @@ EFL_START_TEST(eina_bezier_test_angle)
65 7, 1); 65 7, 1);
66 angle = eina_bezier_angle_at(&b, 0.5); 66 angle = eina_bezier_angle_at(&b, 0.5);
67 67
68 fail_if(angle != 0); 68 fail_if(EINA_DBL_NONZERO(angle));
69 69
70 eina_bezier_values_set(&b, 70 eina_bezier_values_set(&b,
71 1, 2, 71 1, 2,
@@ -73,7 +73,7 @@ EFL_START_TEST(eina_bezier_test_angle)
73 1, 6, 73 1, 6,
74 1, 8); 74 1, 8);
75 angle = eina_bezier_angle_at(&b, 0.5); 75 angle = eina_bezier_angle_at(&b, 0.5);
76 fail_if(floor(angle) != 90); 76 fail_if(!EINA_DBL_EQ(floor(angle), 90));
77 77
78} 78}
79EFL_END_TEST 79EFL_END_TEST
@@ -89,7 +89,7 @@ EFL_START_TEST(eina_bezier_test_length)
89 5, 1, 89 5, 1,
90 7, 1); 90 7, 1);
91 length = eina_bezier_length_get(&b); 91 length = eina_bezier_length_get(&b);
92 fail_if(floor(length) != 6); 92 fail_if(!EINA_DBL_EQ(floor(length), 6));
93 93
94 eina_bezier_values_set(&b, 94 eina_bezier_values_set(&b,
95 1, 1, 95 1, 1,
@@ -97,7 +97,7 @@ EFL_START_TEST(eina_bezier_test_length)
97 1, 1, 97 1, 1,
98 1, 1); 98 1, 1);
99 length = eina_bezier_length_get(&b); 99 length = eina_bezier_length_get(&b);
100 fail_if(length != 0); 100 fail_if(!EINA_DBL_EQ(length, 0));
101 101
102} 102}
103EFL_END_TEST 103EFL_END_TEST
@@ -114,10 +114,10 @@ EFL_START_TEST(eina_bezier_test_t_at)
114 7, 1); 114 7, 1);
115 length = eina_bezier_length_get(&b); 115 length = eina_bezier_length_get(&b);
116 t = eina_bezier_t_at(&b, 0); 116 t = eina_bezier_t_at(&b, 0);
117 fail_if(floor(t) != 0); 117 fail_if(!EINA_DBL_EQ(floor(t), 0));
118 118
119 t = eina_bezier_t_at(&b, length); 119 t = eina_bezier_t_at(&b, length);
120 fail_if(t != 1); 120 fail_if(!EINA_DBL_EQ(t, 1));
121 121
122} 122}
123EFL_END_TEST 123EFL_END_TEST
@@ -133,13 +133,13 @@ EFL_START_TEST(eina_bezier_test_point_at)
133 5, 6, 133 5, 6,
134 7, 8); 134 7, 8);
135 eina_bezier_point_at(&b, 0, &x , &y); 135 eina_bezier_point_at(&b, 0, &x , &y);
136 fail_if(x != 1 || 136 fail_if(!EINA_DBL_EQ(x, 1) ||
137 y != 2); 137 !EINA_DBL_EQ(y, 2));
138 138
139 eina_bezier_point_at(&b, 1, &x , &y); 139 eina_bezier_point_at(&b, 1, &x , &y);
140 140
141 fail_if(x != 7 || 141 fail_if(!EINA_DBL_EQ(x, 7) ||
142 y != 8); 142 !EINA_DBL_EQ(y, 8));
143 143
144} 144}
145EFL_END_TEST 145EFL_END_TEST
@@ -159,7 +159,7 @@ EFL_START_TEST(eina_bezier_test_split_at_length)
159 len1 = eina_bezier_length_get(&l); 159 len1 = eina_bezier_length_get(&l);
160 len2 = eina_bezier_length_get(&r); 160 len2 = eina_bezier_length_get(&r);
161 161
162 fail_if(len != (len1 + len2)); 162 fail_if(!EINA_DBL_EQ(len, (len1 + len2)));
163 163
164} 164}
165EFL_END_TEST 165EFL_END_TEST
@@ -177,7 +177,7 @@ EFL_START_TEST(eina_bezier_test_bounds_get)
177 177
178 eina_bezier_bounds_get(&b, &x, &y, &w, &h); 178 eina_bezier_bounds_get(&b, &x, &y, &w, &h);
179 179
180 fail_if(x !=0 || y!=0 || w !=100 || h !=100 ); 180 fail_if(!EINA_DBL_EQ(x, 0) || !EINA_DBL_EQ(y, 0) || !EINA_DBL_EQ(w, 100) || !EINA_DBL_EQ(h, 100));
181 181
182} 182}
183EFL_END_TEST 183EFL_END_TEST
@@ -196,7 +196,7 @@ EFL_START_TEST(eina_bezier_test_on_interval)
196 eina_bezier_on_interval(&b, 0.25, 0.5, &res); 196 eina_bezier_on_interval(&b, 0.25, 0.5, &res);
197 eina_bezier_point_at(&res, 0, &px2, &py2); 197 eina_bezier_point_at(&res, 0, &px2, &py2);
198 198
199 fail_if(px1 != px2 || py1 != py2); 199 fail_if(!EINA_DBL_EQ(px1, px2) || !EINA_DBL_EQ(py1, py2));
200 200
201} 201}
202EFL_END_TEST 202EFL_END_TEST
diff --git a/src/tests/eina/eina_test_quaternion.c b/src/tests/eina/eina_test_quaternion.c
index fc1ec16bef..72360ec22c 100644
--- a/src/tests/eina/eina_test_quaternion.c
+++ b/src/tests/eina/eina_test_quaternion.c
@@ -220,7 +220,7 @@ EFL_START_TEST(eina_test_quaternion_dot)
220 220
221 221
222 res = eina_quaternion_dot(&q, &r); 222 res = eina_quaternion_dot(&q, &r);
223 fail_if(res != 59); 223 fail_if(!EINA_DBL_EQ(res, 59));
224 224
225} 225}
226EFL_END_TEST 226EFL_END_TEST
@@ -457,25 +457,25 @@ EFL_START_TEST(eina_test_quaternion_operations)
457 (out.z + 0.1 > DBL_EPSILON) || (out.w - 0.1 > DBL_EPSILON)); 457 (out.z + 0.1 > DBL_EPSILON) || (out.w - 0.1 > DBL_EPSILON));
458 458
459 eina_quaternion_array_set(&out, v); 459 eina_quaternion_array_set(&out, v);
460 fail_if((out.x != 0) || (out.y != 1) || 460 fail_if((!EINA_DBL_EQ(out.x, 0)) || (!EINA_DBL_EQ(out.y, 1)) ||
461 (out.z != 2) || (out.w != 3)); 461 (!EINA_DBL_EQ(out.z, 2)) || (!EINA_DBL_EQ(out.w, 3)));
462 462
463 eina_quaternion_copy(&out, &in); 463 eina_quaternion_copy(&out, &in);
464 fail_if((out.x != 2) || (out.y != 2) || 464 fail_if((!EINA_DBL_EQ(out.x, 2)) || (!EINA_DBL_EQ(out.y, 2)) ||
465 (out.z != 1) || (out.w != 1)); 465 (!EINA_DBL_EQ(out.z, 1)) || (!EINA_DBL_EQ(out.w, 1)));
466 466
467 eina_quaternion_homogeneous_regulate(&out, &in2); 467 eina_quaternion_homogeneous_regulate(&out, &in2);
468 fail_if((out.x != 1) || (out.y != 1) || 468 fail_if((!EINA_DBL_EQ(out.x, 1)) || (!EINA_DBL_EQ(out.y, 1)) ||
469 (out.z != 1) || (out.w != 1)); 469 (!EINA_DBL_EQ(out.z, 1)) || (!EINA_DBL_EQ(out.w, 1)));
470 470
471 eina_quaternion_subtract(&out, &in2, &in); 471 eina_quaternion_subtract(&out, &in2, &in);
472 fail_if((out.x != 3) || (out.y != 3) || 472 fail_if((!EINA_DBL_EQ(out.x, 3)) || (!EINA_DBL_EQ(out.y, 3)) ||
473 (out.z != 4) || (out.w != 4)); 473 (!EINA_DBL_EQ(out.z, 4)) || (!EINA_DBL_EQ(out.w, 4)));
474 474
475 fail_if(eina_quaternion_length_get(&in2) != 10); 475 fail_if(!EINA_DBL_EQ(eina_quaternion_length_get(&in2), 10));
476 fail_if(eina_quaternion_length_square_get(&in) != 10); 476 fail_if(!EINA_DBL_EQ(eina_quaternion_length_square_get(&in), 10));
477 fail_if((eina_quaternion_distance_get(&in2, &in) - sqrt(50)) > DBL_EPSILON); 477 fail_if((eina_quaternion_distance_get(&in2, &in) - sqrt(50)) > DBL_EPSILON);
478 fail_if(eina_quaternion_distance_square_get(&in2, &in) != 50); 478 fail_if(!EINA_DBL_EQ(eina_quaternion_distance_square_get(&in2, &in), 50));
479 479
480 angle = eina_quaternion_angle_plains(&in, &in2); 480 angle = eina_quaternion_angle_plains(&in, &in2);
481 fail_if(angle - 0.963 > DBL_EPSILON); 481 fail_if(angle - 0.963 > DBL_EPSILON);
diff --git a/src/tests/eina/eina_test_vector.c b/src/tests/eina/eina_test_vector.c
index 6030dfc528..e4afa8bc9a 100644
--- a/src/tests/eina/eina_test_vector.c
+++ b/src/tests/eina/eina_test_vector.c
@@ -42,41 +42,41 @@ EFL_START_TEST(eina_test_vector2_operations)
42 42
43 43
44 eina_vector2_set(&v1, x, y); 44 eina_vector2_set(&v1, x, y);
45 fail_if((v1.x != 1) || (v1.y != 2)); 45 fail_if(!EINA_DBL_EQ(v1.x, 1) || !EINA_DBL_EQ(v1.y, 2));
46 46
47 eina_vector2_array_set(&v2, arr); 47 eina_vector2_array_set(&v2, arr);
48 fail_if((v2.x != 5) || (v2.y != 5)); 48 fail_if(!EINA_DBL_EQ(v2.x, 5) || !EINA_DBL_EQ(v2.y, 5));
49 49
50 eina_vector2_copy(&v1, &v2); 50 eina_vector2_copy(&v1, &v2);
51 fail_if((v1.x != 5) || (v1.y != 5)); 51 fail_if(!EINA_DBL_EQ(v1.x, 5) || !EINA_DBL_EQ(v1.y, 5));
52 52
53 eina_vector2_negate(&v1, &v2); 53 eina_vector2_negate(&v1, &v2);
54 fail_if((v1.x != -5) || (v1.y != -5)); 54 fail_if(!EINA_DBL_EQ(v1.x, -5) || !EINA_DBL_EQ(v1.y, -5));
55 55
56 eina_vector2_set(&v1, x, y); 56 eina_vector2_set(&v1, x, y);
57 eina_vector2_add(&v3, &v1, &v2); 57 eina_vector2_add(&v3, &v1, &v2);
58 fail_if((v3.x != 6) || (v3.y != 7)); 58 fail_if(!EINA_DBL_EQ(v3.x, 6) || !EINA_DBL_EQ(v3.y, 7));
59 59
60 eina_vector2_subtract(&v3, &v2, &v1); 60 eina_vector2_subtract(&v3, &v2, &v1);
61 fail_if((v3.x != 4) || (v3.y != 3)); 61 fail_if(!EINA_DBL_EQ(v3.x, 4) || !EINA_DBL_EQ(v3.y, 3));
62 62
63 eina_vector2_scale(&v3, &v1, y); 63 eina_vector2_scale(&v3, &v1, y);
64 fail_if((v3.x != 2) || (v3.y != 4)); 64 fail_if(!EINA_DBL_EQ(v3.x, 2) || !EINA_DBL_EQ(v3.y, 4));
65 65
66 res = eina_vector2_dot_product(&v1, &v2); 66 res = eina_vector2_dot_product(&v1, &v2);
67 fail_if(res != 15); 67 fail_if(!EINA_DBL_EQ(res, 15));
68 68
69 res = eina_vector2_length_get(&v2); 69 res = eina_vector2_length_get(&v2);
70 fail_if((res - sqrt(50)) > DBL_EPSILON); 70 fail_if((res - sqrt(50)) > DBL_EPSILON);
71 71
72 res = eina_vector2_length_square_get(&v2); 72 res = eina_vector2_length_square_get(&v2);
73 fail_if(res != 50); 73 fail_if(!EINA_DBL_EQ(res, 50));
74 74
75 res = eina_vector2_distance_get(&v2, &v1); 75 res = eina_vector2_distance_get(&v2, &v1);
76 fail_if((res - sqrt(25)) > DBL_EPSILON); 76 fail_if((res - sqrt(25)) > DBL_EPSILON);
77 77
78 res = eina_vector2_distance_square_get(&v2, &v1); 78 res = eina_vector2_distance_square_get(&v2, &v1);
79 fail_if(res != 25); 79 fail_if(!EINA_DBL_EQ(res, 25));
80 80
81 eina_vector2_normalize(&v3, &v2); 81 eina_vector2_normalize(&v3, &v2);
82 fail_if((v3.x - v2.x / sqrt(50)) > DBL_EPSILON || 82 fail_if((v3.x - v2.x / sqrt(50)) > DBL_EPSILON ||
@@ -86,10 +86,10 @@ EFL_START_TEST(eina_test_vector2_operations)
86 2, 2, 86 2, 2,
87 2, 2); 87 2, 2);
88 eina_vector2_transform(&v3, &m2, &v1); 88 eina_vector2_transform(&v3, &m2, &v1);
89 fail_if((v3.x != 6) || (v3.y != 6)); 89 fail_if(!EINA_DBL_EQ(v3.x, 6) || !EINA_DBL_EQ(v3.y, 6));
90 90
91 eina_vector2_transform(&v3, &m2, &v3); 91 eina_vector2_transform(&v3, &m2, &v3);
92 fail_if((v3.x != 24) || (v3.y != 24)); 92 fail_if(!EINA_DBL_EQ(v3.x, 24) || !EINA_DBL_EQ(v3.y, 24));
93 93
94 eina_matrix3_values_set(&m3, 94 eina_matrix3_values_set(&m3,
95 2, 2, 2, 95 2, 2, 2,
@@ -97,14 +97,14 @@ EFL_START_TEST(eina_test_vector2_operations)
97 2, 2, 2); 97 2, 2, 2);
98 98
99 eina_vector2_homogeneous_position_transform(&v3, &m3, &v1); 99 eina_vector2_homogeneous_position_transform(&v3, &m3, &v1);
100 fail_if((v3.x != 1) || (v3.y != 1)); 100 fail_if(!EINA_DBL_EQ(v3.x, 1) || !EINA_DBL_EQ(v3.y, 1));
101 101
102 102
103 eina_vector2_homogeneous_direction_transform(&v3, &m3, &v1); 103 eina_vector2_homogeneous_direction_transform(&v3, &m3, &v1);
104 fail_if((v3.x != 6) || (v3.y != 6)); 104 fail_if(!EINA_DBL_EQ(v3.x, 6) || !EINA_DBL_EQ(v3.y, 6));
105 105
106 eina_vector2_homogeneous_direction_transform(&v3, &m3, &v3); 106 eina_vector2_homogeneous_direction_transform(&v3, &m3, &v3);
107 fail_if((v3.x != 24) || (v3.y != 24)); 107 fail_if(!EINA_DBL_EQ(v3.x, 24) || !EINA_DBL_EQ(v3.y, 24));
108 108
109} 109}
110EFL_END_TEST 110EFL_END_TEST
@@ -126,51 +126,51 @@ EFL_START_TEST(eina_test_vector3_operations)
126 126
127 127
128 eina_vector3_set(&v1, x, y, z); 128 eina_vector3_set(&v1, x, y, z);
129 fail_if((v1.x != 1) || (v1.y != 2) || (v1.z != 3)); 129 fail_if(!EINA_DBL_EQ(v1.x, 1) || !EINA_DBL_EQ(v1.y, 2) || !EINA_DBL_EQ(v1.z, 3));
130 130
131 eina_vector3_array_set(&v2, arr); 131 eina_vector3_array_set(&v2, arr);
132 fail_if((v2.x != 5) || (v2.y != 5) || (v2.z != 5)); 132 fail_if(!EINA_DBL_EQ(v2.x, 5) || !EINA_DBL_EQ(v2.y, 5) || !EINA_DBL_EQ(v2.z, 5));
133 133
134 eina_vector3_copy(&v1, &v2); 134 eina_vector3_copy(&v1, &v2);
135 fail_if((v1.x != 5) || (v1.y != 5) || (v1.z != 5)); 135 fail_if(!EINA_DBL_EQ(v1.x, 5) || !EINA_DBL_EQ(v1.y, 5) || !EINA_DBL_EQ(v1.z, 5));
136 136
137 eina_vector3_negate(&v1, &v2); 137 eina_vector3_negate(&v1, &v2);
138 fail_if((v1.x != -5) || (v1.y != -5), (v1.z != -5)); 138 fail_if(!EINA_DBL_EQ(v1.x, -5) || !EINA_DBL_EQ(v1.y, -5) || !EINA_DBL_EQ(v1.z, -5));
139 139
140 eina_vector3_set(&v1, x, y, z); 140 eina_vector3_set(&v1, x, y, z);
141 eina_vector3_add(&v3, &v1, &v2); 141 eina_vector3_add(&v3, &v1, &v2);
142 fail_if((v3.x != 6) || (v3.y != 7) || v3.z != 8); 142 fail_if(!EINA_DBL_EQ(v3.x, 6) || !EINA_DBL_EQ(v3.y, 7) || !EINA_DBL_EQ(v3.z, 8));
143 143
144 eina_vector3_subtract(&v3, &v2, &v1); 144 eina_vector3_subtract(&v3, &v2, &v1);
145 fail_if((v3.x != 4) || (v3.y != 3) || (v3.z != 2)); 145 fail_if(!EINA_DBL_EQ(v3.x, 4) || !EINA_DBL_EQ(v3.y, 3) || !EINA_DBL_EQ(v3.z, 2));
146 146
147 eina_vector3_scale(&v3, &v1, y); 147 eina_vector3_scale(&v3, &v1, y);
148 fail_if((v3.x != 2) || (v3.y != 4) || (v3.z != 6)); 148 fail_if(!EINA_DBL_EQ(v3.x, 2) || !EINA_DBL_EQ(v3.y, 4) || !EINA_DBL_EQ(v3.z, 6));
149 149
150 eina_vector3_multiply(&v3, &v2, &v1); 150 eina_vector3_multiply(&v3, &v2, &v1);
151 fail_if((v3.x != 5) || (v3.y != 10) || (v3.z != 15)); 151 fail_if(!EINA_DBL_EQ(v3.x, 5) || !EINA_DBL_EQ(v3.y, 10) || !EINA_DBL_EQ(v3.z, 15));
152 152
153 res = eina_vector3_dot_product(&v1, &v2); 153 res = eina_vector3_dot_product(&v1, &v2);
154 fail_if(res != 30); 154 fail_if(!EINA_DBL_EQ(res, 30));
155 155
156 eina_vector3_cross_product(&v3, &v1, &v2); 156 eina_vector3_cross_product(&v3, &v1, &v2);
157 fail_if((v3.x != -5) || (v3.y != 10) || (v3.z != -5)); 157 fail_if(!EINA_DBL_EQ(v3.x, -5) || !EINA_DBL_EQ(v3.y, 10) || !EINA_DBL_EQ(v3.z, -5));
158 158
159 eina_vector3_cross_product(&v3, &v1, &v3); 159 eina_vector3_cross_product(&v3, &v1, &v3);
160 fail_if((v3.x != -40) || (v3.y != -10) || (v3.z != 20)); 160 fail_if(!EINA_DBL_EQ(v3.x, -40) || !EINA_DBL_EQ(v3.y, -10) || !EINA_DBL_EQ(v3.z, 20));
161 161
162 162
163 res = eina_vector3_length_get(&v2); 163 res = eina_vector3_length_get(&v2);
164 fail_if((res - sqrt(75)) > DBL_EPSILON); 164 fail_if((res - sqrt(75)) > DBL_EPSILON);
165 165
166 res = eina_vector3_length_square_get(&v2); 166 res = eina_vector3_length_square_get(&v2);
167 fail_if(res != 75); 167 fail_if(!EINA_DBL_EQ(res, 75));
168 168
169 res = eina_vector3_distance_get(&v2, &v1); 169 res = eina_vector3_distance_get(&v2, &v1);
170 fail_if((res - sqrt(29)) > (DBL_EPSILON * 2.0)); 170 fail_if((res - sqrt(29)) > (DBL_EPSILON * 2.0));
171 171
172 res = eina_vector3_distance_square_get(&v2, &v1); 172 res = eina_vector3_distance_square_get(&v2, &v1);
173 fail_if(res != 29); 173 fail_if(!EINA_DBL_EQ(res, 29));
174 174
175 eina_vector3_normalize(&v3, &v2); 175 eina_vector3_normalize(&v3, &v2);
176 fail_if((v3.x - v2.x / sqrt(75)) > DBL_EPSILON || 176 fail_if((v3.x - v2.x / sqrt(75)) > DBL_EPSILON ||
@@ -185,10 +185,10 @@ EFL_START_TEST(eina_test_vector3_operations)
185 2, 2, 2, 185 2, 2, 2,
186 2, 2, 2); 186 2, 2, 2);
187 eina_vector3_transform(&v3, &m3, &v1); 187 eina_vector3_transform(&v3, &m3, &v1);
188 fail_if((v3.x != 12) || (v3.y != 12) || (v3.z != 12)); 188 fail_if(!EINA_DBL_EQ(v3.x, 12) || !EINA_DBL_EQ(v3.y, 12) || !EINA_DBL_EQ(v3.z, 12));
189 189
190 eina_vector3_transform(&v3, &m3, &v3); 190 eina_vector3_transform(&v3, &m3, &v3);
191 fail_if((v3.x != 72) || (v3.y != 72) || (v3.z != 72)); 191 fail_if(!EINA_DBL_EQ(v3.x, 72) || !EINA_DBL_EQ(v3.y, 72) || !EINA_DBL_EQ(v3.z, 72));
192 192
193 eina_matrix4_values_set(&m4, 193 eina_matrix4_values_set(&m4,
194 2, 2, 2, 2, 194 2, 2, 2, 2,
@@ -196,24 +196,24 @@ EFL_START_TEST(eina_test_vector3_operations)
196 2, 2, 2, 2, 196 2, 2, 2, 2,
197 2, 2, 2, 2); 197 2, 2, 2, 2);
198 eina_vector3_homogeneous_position_transform(&v3, &m4, &v1); 198 eina_vector3_homogeneous_position_transform(&v3, &m4, &v1);
199 fail_if((v3.x != 1) || (v3.y != 1) || (v3.z != 1)); 199 fail_if(!EINA_DBL_EQ(v3.x, 1) || !EINA_DBL_EQ(v3.y, 1) || !EINA_DBL_EQ(v3.z, 1));
200 200
201 eina_quaternion_set(&q, 2, 2, 2, 0); 201 eina_quaternion_set(&q, 2, 2, 2, 0);
202 eina_vector3_quaternion_rotate(&v3, &v1, &q); 202 eina_vector3_quaternion_rotate(&v3, &v1, &q);
203 fail_if((v3.x != 25) || (v3.y != 2) || (v3.z != -21)); 203 fail_if(!EINA_DBL_EQ(v3.x, 25) || !EINA_DBL_EQ(v3.y, 2) || !EINA_DBL_EQ(v3.z, -21));
204 204
205 eina_vector3_orthogonal_projection_on_plane(&v3, &v1, &v2); 205 eina_vector3_orthogonal_projection_on_plane(&v3, &v1, &v2);
206 fail_if((v3.x != -1) || (v3.y != 0) || (v3.z != 1)); 206 fail_if(!EINA_DBL_EQ(v3.x, -1) || !EINA_DBL_EQ(v3.y, 0) || !EINA_DBL_EQ(v3.z, 1));
207 207
208 eina_vector3_plane_by_points(&q, &v3, &v1, &v2); 208 eina_vector3_plane_by_points(&q, &v3, &v1, &v2);
209 fail_if((q.x != -2) || (q.y != 4) || (q.z != -2) || (q.z > DBL_EPSILON)); 209 fail_if(!EINA_DBL_EQ(q.x, -2) || !EINA_DBL_EQ(q.y, 4) || !EINA_DBL_EQ(q.z, -2) || (q.z > DBL_EPSILON));
210 210
211 eina_vector3_homogeneous_direction_set(&v3, &q); 211 eina_vector3_homogeneous_direction_set(&v3, &q);
212 fail_if((v3.x != -2) || (v3.y != 4) || (v3.z != -2)); 212 fail_if(!EINA_DBL_EQ(v3.x, -2) || !EINA_DBL_EQ(v3.y, 4) || !EINA_DBL_EQ(v3.z, -2));
213 213
214 eina_quaternion_set(&q, 2, 2, 2, 0.5); 214 eina_quaternion_set(&q, 2, 2, 2, 0.5);
215 eina_vector3_homogeneous_position_set(&v3, &q); 215 eina_vector3_homogeneous_position_set(&v3, &q);
216 fail_if((v3.x != 4) || (v3.y != 4) || (v3.z != 4)); 216 fail_if(!EINA_DBL_EQ(v3.x, 4) || !EINA_DBL_EQ(v3.y, 4) || !EINA_DBL_EQ(v3.z, 4));
217 217
218 res2 = eina_vector3_equivalent(&v1, &v2); 218 res2 = eina_vector3_equivalent(&v1, &v2);
219 fail_if(res2 != EINA_FALSE); 219 fail_if(res2 != EINA_FALSE);
@@ -230,10 +230,10 @@ EFL_START_TEST(eina_test_vector3_operations)
230 fail_if(res2 != EINA_TRUE); 230 fail_if(res2 != EINA_TRUE);
231 231
232 eina_vector3_homogeneous_direction_transform(&v3, &m4, &v1); 232 eina_vector3_homogeneous_direction_transform(&v3, &m4, &v1);
233 fail_if((v3.x != 12) || (v3.y != 12) || (v3.z != 12)); 233 fail_if(!EINA_DBL_EQ(v3.x, 12) || !EINA_DBL_EQ(v3.y, 12) || !EINA_DBL_EQ(v3.z, 12));
234 234
235 eina_vector3_homogeneous_direction_transform(&v3, &m4, &v3); 235 eina_vector3_homogeneous_direction_transform(&v3, &m4, &v3);
236 fail_if((v3.x != 72) || (v3.y != 72) || (v3.z != 72)); 236 fail_if(!EINA_DBL_EQ(v3.x, 72) || !EINA_DBL_EQ(v3.y, 72) || !EINA_DBL_EQ(v3.z, 72));
237 237
238} 238}
239EFL_END_TEST 239EFL_END_TEST
diff --git a/src/tests/elementary/efl_ui_test_config.c b/src/tests/elementary/efl_ui_test_config.c
index a9f31ea988..62ab977ae1 100644
--- a/src/tests/elementary/efl_ui_test_config.c
+++ b/src/tests/elementary/efl_ui_test_config.c
@@ -25,7 +25,15 @@ EFL_START_TEST(efl_config_eoapi)
25 25
26#define CONFIG_CHKB(opt, val) CONFIG_CHK(opt, bool, val) 26#define CONFIG_CHKB(opt, val) CONFIG_CHK(opt, bool, val)
27#define CONFIG_CHKI(opt, val) CONFIG_CHK(opt, int, val) 27#define CONFIG_CHKI(opt, val) CONFIG_CHK(opt, int, val)
28#define CONFIG_CHKD(opt, val) CONFIG_CHK(opt, double, val) 28
29#define CONFIG_CHKD_internal(opt, typ, val) do { \
30 typ old = elm_config_ ## opt ## _get(); \
31 fail_if(!EINA_DBL_EQ(old, efl_config_ ## typ ## _get(cfg, #opt))); \
32 fail_if(!efl_config_ ## typ ## _set(cfg, #opt, val)); \
33 fail_if(!EINA_DBL_EQ(elm_config_ ## opt ## _get(), val)); \
34 fail_if(!EINA_DBL_EQ(efl_config_ ## typ ## _get(cfg, #opt), val)); \
35 } while (0)
36#define CONFIG_CHKD(opt, val) CONFIG_CHKD_internal(opt, double, val)
29 37
30 // note: leaks badly 38 // note: leaks badly
31#define CONFIG_CHKS(opt, val) do { \ 39#define CONFIG_CHKS(opt, val) do { \
diff --git a/src/tests/elementary/efl_ui_test_spin_button.c b/src/tests/elementary/efl_ui_test_spin_button.c
index db6ddc2831..6df99b340f 100644
--- a/src/tests/elementary/efl_ui_test_spin_button.c
+++ b/src/tests/elementary/efl_ui_test_spin_button.c
@@ -63,7 +63,7 @@ EFL_START_TEST (spin_wheel_test)
63 get_me_to_those_events(spin); 63 get_me_to_those_events(spin);
64 evas_event_feed_mouse_move(evas_object_evas_get(spin), 30, 30, 1234, NULL); 64 evas_event_feed_mouse_move(evas_object_evas_get(spin), 30, 30, 1234, NULL);
65 evas_event_feed_mouse_wheel(evas_object_evas_get(spin), -1, -1, 12345, NULL); 65 evas_event_feed_mouse_wheel(evas_object_evas_get(spin), -1, -1, 12345, NULL);
66 ck_assert(efl_ui_range_value_get(spin) == 10.0); 66 ck_assert(EINA_DBL_EQ(efl_ui_range_value_get(spin), 10.0));
67 ck_assert_int_eq(changed, EINA_TRUE); 67 ck_assert_int_eq(changed, EINA_TRUE);
68 ck_assert_int_eq(min_reached, EINA_FALSE); 68 ck_assert_int_eq(min_reached, EINA_FALSE);
69 ck_assert_int_eq(max_reached, EINA_FALSE); 69 ck_assert_int_eq(max_reached, EINA_FALSE);
@@ -72,7 +72,7 @@ EFL_START_TEST (spin_wheel_test)
72 max_reached = EINA_FALSE; 72 max_reached = EINA_FALSE;
73 73
74 evas_event_feed_mouse_wheel(evas_object_evas_get(spin), -1, 1, 12345, NULL); 74 evas_event_feed_mouse_wheel(evas_object_evas_get(spin), -1, 1, 12345, NULL);
75 ck_assert(efl_ui_range_value_get(spin) == 0.0); 75 ck_assert(EINA_DBL_EQ(efl_ui_range_value_get(spin), 0.0));
76 ck_assert_int_eq(changed, EINA_TRUE); 76 ck_assert_int_eq(changed, EINA_TRUE);
77 ck_assert_int_eq(min_reached, EINA_FALSE); 77 ck_assert_int_eq(min_reached, EINA_FALSE);
78 ck_assert_int_eq(max_reached, EINA_FALSE); 78 ck_assert_int_eq(max_reached, EINA_FALSE);
diff --git a/src/tests/elementary/efl_ui_test_spotlight.c b/src/tests/elementary/efl_ui_test_spotlight.c
index e26acad108..2166702797 100644
--- a/src/tests/elementary/efl_ui_test_spotlight.c
+++ b/src/tests/elementary/efl_ui_test_spotlight.c
@@ -127,7 +127,7 @@ static void
127_emit_pos(Eo *obj, double d) 127_emit_pos(Eo *obj, double d)
128{ 128{
129 printf("EMITTING %f %f\n", d, transition_calls.last_position); 129 printf("EMITTING %f %f\n", d, transition_calls.last_position);
130 if (d == transition_calls.last_position) return; 130 if (EINA_DBL_EQ(d, transition_calls.last_position)) return;
131 131
132 efl_event_callback_call(obj, EFL_UI_SPOTLIGHT_MANAGER_EVENT_POS_UPDATE, &d); 132 efl_event_callback_call(obj, EFL_UI_SPOTLIGHT_MANAGER_EVENT_POS_UPDATE, &d);
133 transition_calls.last_position = d; 133 transition_calls.last_position = d;
@@ -403,7 +403,7 @@ _verify_indicator_calls(void)
403 ck_assert_ptr_eq(indicator_calls.content_add.subobj, w); 403 ck_assert_ptr_eq(indicator_calls.content_add.subobj, w);
404 ck_assert_int_eq(indicator_calls.content_del.called, 0); 404 ck_assert_int_eq(indicator_calls.content_del.called, 0);
405 ck_assert_int_eq(indicator_calls.position_update.called, 1); 405 ck_assert_int_eq(indicator_calls.position_update.called, 1);
406 ck_assert(indicator_calls.position_update.position == 0.0); 406 ck_assert(EINA_DBL_EQ(indicator_calls.position_update.position, 0.0));
407 indicator_calls.content_add.called = 0; 407 indicator_calls.content_add.called = 0;
408 indicator_calls.position_update.called = 0; 408 indicator_calls.position_update.called = 0;
409 409
@@ -414,7 +414,7 @@ _verify_indicator_calls(void)
414 ck_assert_ptr_eq(indicator_calls.content_add.subobj, w1); 414 ck_assert_ptr_eq(indicator_calls.content_add.subobj, w1);
415 ck_assert_int_eq(indicator_calls.content_del.called, 0); 415 ck_assert_int_eq(indicator_calls.content_del.called, 0);
416 ck_assert_int_eq(indicator_calls.position_update.called, 1); 416 ck_assert_int_eq(indicator_calls.position_update.called, 1);
417 ck_assert(indicator_calls.position_update.position == 1.0); 417 ck_assert(EINA_DBL_EQ(indicator_calls.position_update.position, 1.0));
418 indicator_calls.content_add.called = 0; 418 indicator_calls.content_add.called = 0;
419 indicator_calls.position_update.called = 0; 419 indicator_calls.position_update.called = 0;
420 420
@@ -435,7 +435,7 @@ _verify_indicator_calls(void)
435 ck_assert_int_eq(indicator_calls.content_del.index, 0); 435 ck_assert_int_eq(indicator_calls.content_del.index, 0);
436 ck_assert_ptr_eq(indicator_calls.content_del.subobj, w1); 436 ck_assert_ptr_eq(indicator_calls.content_del.subobj, w1);
437 ck_assert_int_eq(indicator_calls.position_update.called, 1); 437 ck_assert_int_eq(indicator_calls.position_update.called, 1);
438 ck_assert(indicator_calls.position_update.position == 0.0); 438 ck_assert(EINA_DBL_EQ(indicator_calls.position_update.position, 0.0));
439 indicator_calls.content_del.called = 0; 439 indicator_calls.content_del.called = 0;
440 indicator_calls.position_update.called = 0; 440 indicator_calls.position_update.called = 0;
441} 441}
diff --git a/src/tests/elementary/spec/efl_test_gfx_arrangement.c b/src/tests/elementary/spec/efl_test_gfx_arrangement.c
index 7c0367b147..417a12bae5 100644
--- a/src/tests/elementary/spec/efl_test_gfx_arrangement.c
+++ b/src/tests/elementary/spec/efl_test_gfx_arrangement.c
@@ -18,8 +18,8 @@ EFL_START_TEST(pack_align)
18 double v, h; \ 18 double v, h; \
19 efl_gfx_arrangement_content_align_set(widget, H, V); \ 19 efl_gfx_arrangement_content_align_set(widget, H, V); \
20 efl_gfx_arrangement_content_align_get(widget, &h, &v); \ 20 efl_gfx_arrangement_content_align_get(widget, &h, &v); \
21 ck_assert(v == rv); \ 21 ck_assert(EINA_DBL_EQ(v, rv)); \
22 ck_assert(h == rh); \ 22 ck_assert(EINA_DBL_EQ(h, rh)); \
23 } while(0); 23 } while(0);
24 24
25 TUPLE_CHECK( 1.0, 1.0, 1.0, 1.0); 25 TUPLE_CHECK( 1.0, 1.0, 1.0, 1.0);
diff --git a/src/tests/elementary/spec/efl_test_range_display.c b/src/tests/elementary/spec/efl_test_range_display.c
index 5704741556..49b1c769a3 100644
--- a/src/tests/elementary/spec/efl_test_range_display.c
+++ b/src/tests/elementary/spec/efl_test_range_display.c
@@ -19,12 +19,12 @@ EFL_START_TEST(value_setting_limits)
19 EXPECT_ERROR_START; 19 EXPECT_ERROR_START;
20 efl_ui_range_value_set(widget, -25.0); 20 efl_ui_range_value_set(widget, -25.0);
21 EXPECT_ERROR_END; 21 EXPECT_ERROR_END;
22 ck_assert(efl_ui_range_value_get(widget) == 10.0); 22 ck_assert(EINA_DBL_EQ(efl_ui_range_value_get(widget), 10.0));
23 23
24 EXPECT_ERROR_START; 24 EXPECT_ERROR_START;
25 efl_ui_range_value_set(widget, 25.0); 25 efl_ui_range_value_set(widget, 25.0);
26 EXPECT_ERROR_END; 26 EXPECT_ERROR_END;
27 ck_assert(efl_ui_range_value_get(widget) == 10.0); 27 ck_assert(EINA_DBL_EQ(efl_ui_range_value_get(widget), 10.0));
28} 28}
29EFL_END_TEST 29EFL_END_TEST
30 30
@@ -34,38 +34,38 @@ EFL_START_TEST(limit_setting)
34 34
35 efl_ui_range_limits_set(widget, -20.0, 20.0); 35 efl_ui_range_limits_set(widget, -20.0, 20.0);
36 efl_ui_range_limits_get(widget, &min, &max); 36 efl_ui_range_limits_get(widget, &min, &max);
37 ck_assert(min == -20.0); 37 ck_assert(EINA_DBL_EQ(min, -20.0));
38 ck_assert(max == 20.0); 38 ck_assert(EINA_DBL_EQ(max, 20.0));
39 EXPECT_ERROR_START; 39 EXPECT_ERROR_START;
40 efl_ui_range_limits_set(widget, -20.0, -20.0); 40 efl_ui_range_limits_set(widget, -20.0, -20.0);
41 EXPECT_ERROR_END; 41 EXPECT_ERROR_END;
42 efl_ui_range_limits_get(widget, &min, &max); 42 efl_ui_range_limits_get(widget, &min, &max);
43 ck_assert(min == -20.0); 43 ck_assert(EINA_DBL_EQ(min, -20.0));
44 ck_assert(max == 20.0); 44 ck_assert(EINA_DBL_EQ(max, 20.0));
45 45
46 EXPECT_ERROR_START; 46 EXPECT_ERROR_START;
47 efl_ui_range_limits_set(widget, 2.0, -20.0); 47 efl_ui_range_limits_set(widget, 2.0, -20.0);
48 EXPECT_ERROR_END; 48 EXPECT_ERROR_END;
49 efl_ui_range_limits_get(widget, &min, &max); 49 efl_ui_range_limits_get(widget, &min, &max);
50 ck_assert(min == -20.0); 50 ck_assert(EINA_DBL_EQ(min, -20.0));
51 ck_assert(max == 20.0); 51 ck_assert(EINA_DBL_EQ(max, 20.0));
52 52
53 EXPECT_ERROR_START; 53 EXPECT_ERROR_START;
54 efl_ui_range_limits_set(widget, 25.0, 20.0); 54 efl_ui_range_limits_set(widget, 25.0, 20.0);
55 EXPECT_ERROR_END; 55 EXPECT_ERROR_END;
56 efl_ui_range_limits_get(widget, &min, &max); 56 efl_ui_range_limits_get(widget, &min, &max);
57 ck_assert(min == -20.0); 57 ck_assert(EINA_DBL_EQ(min, -20.0));
58 ck_assert(max == 20.0); 58 ck_assert(EINA_DBL_EQ(max, 20.0));
59 59
60 efl_ui_range_limits_set(widget, -25.0, -20.0); 60 efl_ui_range_limits_set(widget, -25.0, -20.0);
61 efl_ui_range_limits_get(widget, &min, &max); 61 efl_ui_range_limits_get(widget, &min, &max);
62 ck_assert(min == -25.0); 62 ck_assert(EINA_DBL_EQ(min, -25.0));
63 ck_assert(max == -20.0); 63 ck_assert(EINA_DBL_EQ(max, -20.0));
64 64
65 efl_ui_range_limits_set(widget, 20.0, 25.0); 65 efl_ui_range_limits_set(widget, 20.0, 25.0);
66 efl_ui_range_limits_get(widget, &min, &max); 66 efl_ui_range_limits_get(widget, &min, &max);
67 ck_assert(min == 20.0); 67 ck_assert(EINA_DBL_EQ(min, 20.0));
68 ck_assert(max == 25.0); 68 ck_assert(EINA_DBL_EQ(max, 25.0));
69} 69}
70EFL_END_TEST 70EFL_END_TEST
71 71
@@ -76,7 +76,7 @@ EFL_START_TEST(value_setting)
76 for (i = -20.0; i <= 20.0; ++i) 76 for (i = -20.0; i <= 20.0; ++i)
77 { 77 {
78 efl_ui_range_value_set(widget, i); 78 efl_ui_range_value_set(widget, i);
79 ck_assert(efl_ui_range_value_get(widget) == i); 79 ck_assert(EINA_DBL_EQ(efl_ui_range_value_get(widget), i));
80 } 80 }
81} 81}
82EFL_END_TEST 82EFL_END_TEST
diff --git a/src/tests/elementary/spec/efl_test_range_interactive.c b/src/tests/elementary/spec/efl_test_range_interactive.c
index c900524120..76b266dab0 100644
--- a/src/tests/elementary/spec/efl_test_range_interactive.c
+++ b/src/tests/elementary/spec/efl_test_range_interactive.c
@@ -16,18 +16,18 @@
16EFL_START_TEST(step_setting) 16EFL_START_TEST(step_setting)
17{ 17{
18 efl_ui_range_step_set(widget, 20.0); 18 efl_ui_range_step_set(widget, 20.0);
19 ck_assert(efl_ui_range_step_get(widget) == 20.0); 19 ck_assert(EINA_DBL_EQ(efl_ui_range_step_get(widget), 20.0));
20 efl_ui_range_step_set(widget, 100.0); 20 efl_ui_range_step_set(widget, 100.0);
21 ck_assert(efl_ui_range_step_get(widget) == 100.0); 21 ck_assert(EINA_DBL_EQ(efl_ui_range_step_get(widget), 100.0));
22 22
23 EXPECT_ERROR_START; 23 EXPECT_ERROR_START;
24 efl_ui_range_step_set(widget, 0.0); 24 efl_ui_range_step_set(widget, 0.0);
25 ck_assert(efl_ui_range_step_get(widget) == 100.0); 25 ck_assert(EINA_DBL_EQ(efl_ui_range_step_get(widget), 100.0));
26 EXPECT_ERROR_END; 26 EXPECT_ERROR_END;
27 27
28 EXPECT_ERROR_START; 28 EXPECT_ERROR_START;
29 efl_ui_range_step_set(widget, -20.0); 29 efl_ui_range_step_set(widget, -20.0);
30 ck_assert(efl_ui_range_step_get(widget) == 100.0); 30 ck_assert(EINA_DBL_EQ(efl_ui_range_step_get(widget), 100.0));
31 EXPECT_ERROR_END; 31 EXPECT_ERROR_END;
32} 32}
33EFL_END_TEST 33EFL_END_TEST
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index ae213b5a28..5e05da98c0 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -639,7 +639,7 @@ EFL_START_TEST(eolian_simple_parsing)
639 fail_if(!expr); 639 fail_if(!expr);
640 v = eolian_expression_eval(expr, EOLIAN_MASK_FLOAT); 640 v = eolian_expression_eval(expr, EOLIAN_MASK_FLOAT);
641 fail_if(v.type != EOLIAN_EXPR_DOUBLE); 641 fail_if(v.type != EOLIAN_EXPR_DOUBLE);
642 fail_if(v.value.d != 1337.6); 642 fail_if(!EINA_DBL_EQ(v.value.d, 1337.6));
643 fail_if(!(eina_iterator_next(iter, (void**)&param))); 643 fail_if(!(eina_iterator_next(iter, (void**)&param)));
644 fail_if(eolian_parameter_direction_get(param) != EOLIAN_PARAMETER_IN); 644 fail_if(eolian_parameter_direction_get(param) != EOLIAN_PARAMETER_IN);
645 fail_if(strcmp(eolian_type_short_name_get(eolian_parameter_type_get(param)), "int")); 645 fail_if(strcmp(eolian_type_short_name_get(eolian_parameter_type_get(param)), "int"));
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), ",.|"));