]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
tests: test large arrays
authorMarek Vavruša <marek.vavrusa@nic.cz>
Wed, 22 Apr 2015 19:39:49 +0000 (21:39 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Wed, 22 Apr 2015 19:39:49 +0000 (21:39 +0200)
tests/test_array.c

index 5151a545fa76473daf87480fa8e8be7913c0885a..8003700abf179eda13b3aee0036d8d5b51bcc504 100644 (file)
@@ -46,6 +46,12 @@ static void test_array(void **state)
                assert_true(ret == 0);
        }
 
+       /* Overfill. */
+       for (unsigned i = 0; i < 4096; ++i) {
+               ret = array_push(arr, i);
+               assert_true(ret >= 0);
+       }
+
        array_clear(arr);
 }