diff options
Diffstat (limited to 'set_test.c')
-rw-r--r-- | set_test.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -14,15 +14,15 @@ int fails = 0; #define ASSERT(x) if (!(x)) { fprintf(stderr, "Assert fail: %s\n", #x); fails++; } int main() { - set empty = empty_set(1000); - - set s = empty_set(1000); + set empty = empty_set(200); + int i; + set s = empty_set(200); dump_set(s); set_add_ip(42, s); dump_set(s); - set k = singleton(1000, 12); + set k = singleton(200, 12); dump_set(k); set_add_ip(126, k); @@ -42,6 +42,8 @@ int main() { set_remove_ip(42, s); ASSERT(!set_mem(42, s)); ASSERT(is_set_empty(s)); + dump_set(s); + dump_set(r); ASSERT(sets_equal(s, r)); set_add_ip(4, r); @@ -50,7 +52,7 @@ int main() { set_add_ip(6, r); printf("A: "); dump_set(r); - set x = empty_set(1000); + set x = empty_set(200); set_union_ip(x, r); printf("A(copy): "); dump_set(x); |