* eina: Add more tests.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 19 Jan 2010 13:51:53 +0000 (13:51 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 19 Jan 2010 13:51:53 +0000 (13:51 +0000)
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

index c90378d..5b7d803 100644 (file)
@@ -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);