From 4753713d3e97ba92d13924763f2eeddf3622d5aa Mon Sep 17 00:00:00 2001 From: cedric Date: Tue, 19 Jan 2010 13:51:53 +0000 Subject: [PATCH] * eina: Add more tests. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@45326 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/tests/eina_test_hash.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/tests/eina_test_hash.c b/src/tests/eina_test_hash.c index c90378d..5b7d803 100644 --- a/src/tests/eina_test_hash.c +++ b/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); -- 2.7.4