summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpierre lamot <pierre.lamot@openwide.fr>2014-12-11 11:21:50 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-05 16:38:06 +0100
commit019b9e55c96705aa9d15d186e3f8a8c5966e4e73 (patch)
treebce3a57f62b0db6bae8b9c830eda6046aeebb33b
parent71dd24a481be00b5a883ccecc9c3ed950cd083e9 (diff)
eina: memcmp can't be used to compare timeval due to potential padding on 64bit architecture.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/tests/eina/eina_test_value.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tests/eina/eina_test_value.c b/src/tests/eina/eina_test_value.c
index 1c8040425c..454aa6011d 100644
--- a/src/tests/eina/eina_test_value.c
+++ b/src/tests/eina/eina_test_value.c
@@ -2314,7 +2314,8 @@ START_TEST(eina_value_test_timeval)
2314 itv.tv_usec = 123; 2314 itv.tv_usec = 123;
2315 fail_unless(eina_value_set(value, itv)); 2315 fail_unless(eina_value_set(value, itv));
2316 fail_unless(eina_value_get(value, &otv)); 2316 fail_unless(eina_value_get(value, &otv));
2317 fail_unless(memcmp(&itv, &otv, sizeof(struct timeval)) == 0); 2317 fail_unless(itv.tv_sec == otv.tv_sec);
2318 fail_unless(itv.tv_usec == otv.tv_usec);
2318 2319
2319 itv.tv_sec = 3; 2320 itv.tv_sec = 3;
2320 itv.tv_usec = -1; 2321 itv.tv_usec = -1;
@@ -2322,7 +2323,8 @@ START_TEST(eina_value_test_timeval)
2322 fail_unless(eina_value_get(value, &otv)); 2323 fail_unless(eina_value_get(value, &otv));
2323 itv.tv_sec = 2; 2324 itv.tv_sec = 2;
2324 itv.tv_usec = 999999; 2325 itv.tv_usec = 999999;
2325 fail_unless(memcmp(&itv, &otv, sizeof(struct timeval)) == 0); 2326 fail_unless(itv.tv_sec == otv.tv_sec);
2327 fail_unless(itv.tv_usec == otv.tv_usec);
2326 2328
2327 fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_CHAR)); 2329 fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_CHAR));
2328 fail_unless(eina_value_convert(value, &other)); 2330 fail_unless(eina_value_convert(value, &other));