From 5049832c3a75fa5088179b9d577f285900350e39 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Tue, 19 Jan 2010 13:51:53 +0000 Subject: [PATCH] * eina: Add more tests. SVN revision: 45326 --- legacy/eina/src/tests/eina_test_hash.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/legacy/eina/src/tests/eina_test_hash.c b/legacy/eina/src/tests/eina_test_hash.c index c90378d6c9..5b7d803f68 100644 --- a/legacy/eina/src/tests/eina_test_hash.c +++ b/legacy/eina/src/tests/eina_test_hash.c @@ -154,8 +154,8 @@ END_TEST START_TEST(eina_hash_all_int) { Eina_Hash *hash; - int64_t j[] = { 4321312301243122, 6, 7 }; - int i[] = { 42, 6, 7 }; + int64_t j[] = { 4321312301243122, 6, 7, 128 }; + int i[] = { 42, 6, 7, 0 }; int64_t *test2; int *test; int it; @@ -165,19 +165,22 @@ START_TEST(eina_hash_all_int) hash = eina_hash_int32_new(NULL); fail_if(hash == NULL); - for (it = 0; it < 3; ++it) + for (it = 0; it < 4; ++it) fail_if(eina_hash_add(hash, &i[it], &i[it]) != EINA_TRUE); fail_if(eina_hash_del(hash, &i[1], &i[1]) != EINA_TRUE); test = eina_hash_find(hash, &i[2]); fail_if(test != &i[2]); + test = eina_hash_find(hash, &i[3]); + fail_if(test != &i[3]); + eina_hash_free(hash); hash = eina_hash_int64_new(NULL); fail_if(hash == NULL); - for (it = 0; it < 3; ++it) + for (it = 0; it < 4; ++it) fail_if(eina_hash_add(hash, &j[it], &j[it]) != EINA_TRUE); fail_if(eina_hash_del(hash, &j[1], &j[1]) != EINA_TRUE);