proposal: Remove test_ks_to_array
@@ -26,34 +26,6 @@ static void test_ksPopAtCursor (void)
ksDel (ks_c);
}
-static void test_ksToArray (void)
-{
- KeySet * ks = ksNew (5, keyNew ("user/test1", KEY_END), keyNew ("user/test2", KEY_END), keyNew ("user/test3", KEY_END), KS_END);
-
- Key ** keyArray = calloc (ksGetSize (ks), sizeof (Key *));
- elektraKsToMemArray (ks, keyArray);
-
- succeed_if_same_string ("user/test1", keyName (keyArray[0]));
- succeed_if_same_string ("user/test2", keyName (keyArray[1]));
- succeed_if_same_string ("user/test3", keyName (keyArray[2]));
-
- /* test if cursor is restored */
- ksNext (ks);
- cursor_t cursor = ksGetCursor (ks);
- elektraKsToMemArray (ks, keyArray);
-
- succeed_if (ksGetCursor (ks) == cursor, "cursor was not restored");
-
- succeed_if (elektraKsToMemArray (0, keyArray) < 0, "wrong result on null pointer");
- succeed_if (elektraKsToMemArray (ks, 0) < 0, "wrong result on null buffer");
- KeySet * empty = ksNew (0, KS_END);
- succeed_if (elektraKsToMemArray (empty, keyArray) == 0, "wrong result on empty keyset");
- ksDel (empty);
-
- elektraFree (keyArray);
- ksDel (ks);
-}
-
int main (int argc, char ** argv)
{
printf ("KEY PROPOSAL TESTS\n");
