]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
tests: added reserve test for array
authorMarek Vavruša <marek.vavrusa@nic.cz>
Sun, 26 Apr 2015 21:38:35 +0000 (23:38 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Sun, 26 Apr 2015 21:38:35 +0000 (23:38 +0200)
tests/test_array.c

index 8003700abf179eda13b3aee0036d8d5b51bcc504..4bfb792545da353589205c398598608c09939f1a 100644 (file)
@@ -39,6 +39,9 @@ static void test_array(void **state)
                assert_true(ret >= 0);
        }
 
+       /* Make sure reservation holds. */
+       assert_true(array_reserve(arr, 5) >= 0);
+
        /* Delete elements. */
        array_del(arr, 0);
        for (size_t i = arr.len; --i;) {