Hashmap testing

This script can help you determine whether your test file covers the most common bugs seen in prior years. When you submit a .c-file, it will be run against a number of faulty hashmap implementations. When the output of such a faulty hashmap differs from the output of the reference solution, you have discovered that bug. The result is a score saying how many bugs your test code has found. The testprog used for grading yields as output:

#bugs found: 5 (out of 5) of which 2 failed assertion(s), 2 valgrind complaint(s), and 1 segfault(s)

Bugs can come in various flavours. Your test program may contain asserts that are violated, valgrind may complain about invalid reads/writes and memory leaks, the buggy implementations may crash (segfault), or the (buggy) output may be different from the one generated by the reference implementation. You are advised to use asserts over print statements as it 1) is good practice (less output = easier to parse), and 2) only the assert output is disclosed in order not to reveal information about the reference solution itself.