+struct test
+ {
+ const char *name;
+ const char *description;
+ void (*function) (void);
+ };
+
+static const struct test tests[] =
+ {
+ {
+ "insert-any-remove-any-random-hash",
+ "insert any order, delete any order (random hash)",
+ test_insert_any_remove_any_random_hash
+ },
+ {
+ "insert-any-remove-any-identity-hash",
+ "insert any order, delete any order (identity hash)",
+ test_insert_any_remove_any_identity_hash
+ },
+ {
+ "insert-any-remove-any-constant-hash",
+ "insert any order, delete any order (constant hash)",
+ test_insert_any_remove_any_constant_hash
+ },
+ {
+ "insert-any-remove-same-random-hash",
+ "insert any order, delete same order (random hash)",
+ test_insert_any_remove_same_random_hash
+ },
+ {
+ "insert-any-remove-same-identity-hash",
+ "insert any order, delete same order (identity hash)",
+ test_insert_any_remove_same_identity_hash
+ },
+ {
+ "insert-any-remove-same-constant-hash",
+ "insert any order, delete same order (constant hash)",
+ test_insert_any_remove_same_constant_hash
+ },
+ {
+ "insert-any-remove-reverse-random-hash",
+ "insert any order, delete reverse order (random hash)",
+ test_insert_any_remove_reverse_random_hash
+ },
+ {
+ "insert-any-remove-reverse-identity-hash",
+ "insert any order, delete reverse order (identity hash)",
+ test_insert_any_remove_reverse_identity_hash
+ },
+ {
+ "insert-any-remove-reverse-constant-hash",
+ "insert any order, delete reverse order (constant hash)",
+ test_insert_any_remove_reverse_constant_hash
+ },
+ {
+ "random-sequence-random-hash",
+ "insert and delete in random sequence (random hash)",
+ test_random_sequence_random_hash
+ },
+ {
+ "random-sequence-identity-hash",
+ "insert and delete in random sequence (identity hash)",
+ test_random_sequence_identity_hash
+ },
+ {
+ "random-sequence-constant-hash",
+ "insert and delete in random sequence (constant hash)",
+ test_random_sequence_constant_hash
+ },
+ {
+ "insert-ordered-random-hash",
+ "insert in ascending order (random hash)",
+ test_insert_ordered_random_hash
+ },
+ {
+ "insert-ordered-identity-hash",
+ "insert in ascending order (identity hash)",
+ test_insert_ordered_identity_hash
+ },
+ {
+ "insert-ordered-constant-hash",
+ "insert in ascending order (constant hash)",
+ test_insert_ordered_constant_hash
+ },
+ {
+ "moved-random-hash",
+ "move elements around in memory (random hash)",
+ test_moved_random_hash
+ },
+ {
+ "moved-identity-hash",
+ "move elements around in memory (identity hash)",
+ test_moved_identity_hash
+ },
+ {
+ "moved-constant-hash",
+ "move elements around in memory (constant hash)",
+ test_moved_constant_hash
+ },
+ {
+ "changed-random-hash",
+ "change key data in nodes (random hash)",
+ test_changed_random_hash
+ },
+ {
+ "changed-identity-hash",
+ "change key data in nodes (identity hash)",
+ test_changed_identity_hash
+ },
+ {
+ "changed-constant-hash",
+ "change key data in nodes (constant hash)",
+ test_changed_constant_hash
+ },
+ {
+ "change-random-hash",
+ "change and move key data in nodes (random hash)",
+ test_change_random_hash
+ },
+ {
+ "change-identity-hash",
+ "change and move key data in nodes (identity hash)",
+ test_change_identity_hash
+ },
+ {
+ "change-constant-hash",
+ "change and move key data in nodes (constant hash)",
+ test_change_constant_hash
+ },
+ {
+ "swap-random-hash",
+ "test swapping tables",
+ test_swap_random_hash
+ },
+ {
+ "clear",
+ "test clearing hash table",
+ test_clear
+ },
+ {
+ "destroy-null",
+ "test destroying null table",
+ test_destroy_null
+ },
+ {
+ "shrink-empty",
+ "test shrinking an empty table",
+ test_shrink_empty
+ },
+ };
+
+enum { N_TESTS = sizeof tests / sizeof *tests };