From 3c8b380b98b8fd5dcbaa3a254ab71ac20a485099 Mon Sep 17 00:00:00 2001 From: Mendes Oulamara Date: Fri, 6 Dec 2013 18:08:37 +0100 Subject: Addition of sets_equal to bitsets --- set_test.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'set_test.c') diff --git a/set_test.c b/set_test.c index a2d49ab..4685bc3 100644 --- a/set_test.c +++ b/set_test.c @@ -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); -- cgit v1.2.3