eina: get rid of float comparison warning from str test.
authorCedric BAIL <cedric@osg.samsung.com>
Tue, 20 Dec 2016 00:27:22 +0000 (16:27 -0800)
committerCedric BAIL <cedric@osg.samsung.com>
Tue, 20 Dec 2016 00:33:46 +0000 (16:33 -0800)
src/tests/eina/eina_test_str.c

index 3ed8b1e..0af97e2 100644 (file)
@@ -336,7 +336,7 @@ START_TEST(str_memdup)
    t2 = (struct temp *)eina_memdup((unsigned char *)&t1, sizeof(struct temp), EINA_TRUE);
    fail_if(t2->i != t1.i);
    fail_if(strcmp(t2->s,t1.s) != 0);
-   fail_if(t2->d != t1.d);
+   fail_if(!EINA_FLT_CMP(t2->d, t1.d));
    free(t2);
 
    memcpy(buf, "aaabbb", 6);