| ... | ... | @@ -1827,9 +1827,9 @@ test "put and remove loop in random order" { |
| 1827 | 1827 | } |
| 1828 | 1828 | } |
| 1829 | 1829 | |
| 1830 | | test "remove one million elements in random order" { |
| 1830 | test "remove many elements in random order" { |
| 1831 | 1831 | const Map = AutoHashMap(u32, u32); |
| 1832 | | const n = 1000 * 1000; |
| 1832 | const n = 1000 * 100; |
| 1833 | 1833 | var map = Map.init(std.heap.page_allocator); |
| 1834 | 1834 | defer map.deinit(); |
| 1835 | 1835 | |
| ... | ... | @@ -2147,14 +2147,14 @@ test "getOrPut allocation failure" { |
| 2147 | 2147 | try testing.expectError(error.OutOfMemory, map.getOrPut(std.testing.failing_allocator, "hello")); |
| 2148 | 2148 | } |
| 2149 | 2149 | |
| 2150 | | test "std.hash_map rehash" { |
| 2150 | test "rehash" { |
| 2151 | 2151 | var map = AutoHashMap(usize, usize).init(std.testing.allocator); |
| 2152 | 2152 | defer map.deinit(); |
| 2153 | 2153 | |
| 2154 | 2154 | var prng = std.Random.DefaultPrng.init(0); |
| 2155 | 2155 | const random = prng.random(); |
| 2156 | 2156 | |
| 2157 | | const count = 6 * random.intRangeLessThan(u32, 100_000, 500_000); |
| 2157 | const count = 4 * random.intRangeLessThan(u32, 100_000, 500_000); |
| 2158 | 2158 | |
| 2159 | 2159 | for (0..count) |i| { |
| 2160 | 2160 | try map.put(i, i); |