chiark / gitweb /
test: adjust max load factor in test_hashmap_many()
authorMichal Schmidt <mschmidt@redhat.com>
Wed, 15 Oct 2014 09:28:23 +0000 (11:28 +0200)
committerMichal Schmidt <mschmidt@redhat.com>
Thu, 30 Oct 2014 18:50:51 +0000 (19:50 +0100)
A reimplementation of hashmaps will follow and it will use 0.8.

src/test/test-hashmap-plain.c

index ce686b650caf7d6f7dedec3666016ddd8400ac91..f7917521c572e8dd61fc47cbe7fd1a1840dd3f71 100644 (file)
@@ -699,9 +699,9 @@ static void test_hashmap_many(void) {
                 for (i = 1; i < tests[j].n_entries*3; i++)
                         assert_se(hashmap_contains(h, UINT_TO_PTR(i)) == (i % 3 == 1));
 
                 for (i = 1; i < tests[j].n_entries*3; i++)
                         assert_se(hashmap_contains(h, UINT_TO_PTR(i)) == (i % 3 == 1));
 
-                log_info("%u <= %u * 0.75 = %g", hashmap_size(h), hashmap_buckets(h), hashmap_buckets(h) * 0.75);
+                log_info("%u <= %u * 0.8 = %g", hashmap_size(h), hashmap_buckets(h), hashmap_buckets(h) * 0.8);
 
 
-                assert_se(hashmap_size(h) <= hashmap_buckets(h) * 0.75);
+                assert_se(hashmap_size(h) <= hashmap_buckets(h) * 0.8);
                 assert_se(hashmap_size(h) == tests[j].n_entries);
 
                 while (!hashmap_isempty(h)) {
                 assert_se(hashmap_size(h) == tests[j].n_entries);
 
                 while (!hashmap_isempty(h)) {