From 240dd1b76931e87f7ea66b20b8ca1a4245a628da Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Fri, 19 Sep 2025 14:40:45 +0800 Subject: [PATCH] Adjust testing parameters --- ds/map/btree/test.ha | 2 +- ds/map/hashmap_fnv/test.ha | 2 +- ds/map/hashmap_siphash/test.ha | 2 +- ds/map/slice_basic/test.ha | 4 ++-- ds/map/slice_sorted/test.ha | 4 ++-- ds/map/swiss/test.ha | 2 +- ds/map/swiss_fnv/test.ha | 4 ++-- ds/map/swiss_siphash/test.ha | 2 +- diff --git a/ds/map/btree/test.ha b/ds/map/btree/test.ha index b13b9ca902141edeab1b8abddf0347bf6d7e3f92..5d6b9ed504ac18bc2af5aa17aa0abe6c05cbc783 100644 --- a/ds/map/btree/test.ha +++ b/ds/map/btree/test.ha @@ -2,7 +2,7 @@ use ds::map; use errors; @test fn test() void = { - const ts: [3]size = [2z, 3z, 8z]; + const ts: [_]size = [2z, 3z, 8z]; for (let i = 0z; i < len(ts); i += 1) { let m: *map = match (new(ts[i])) { case let p: *map => yield p; diff --git a/ds/map/hashmap_fnv/test.ha b/ds/map/hashmap_fnv/test.ha index 119e65ad49def84a700371b1db3b4c298b358389..c4024f60be81243196de400ccf1e37f6f29f9e77 100644 --- a/ds/map/hashmap_fnv/test.ha +++ b/ds/map/hashmap_fnv/test.ha @@ -15,7 +15,7 @@ }; }; @test fn test() void = { - const buckets: [_]size = [128z, 256z]; + const buckets: [_]size = [64z, 128z]; const makers: [_]*fn() (*map::map | nomem) = [&mk_slice_basic]; for (let bi = 0z; bi < len(buckets); bi += 1) { diff --git a/ds/map/hashmap_siphash/test.ha b/ds/map/hashmap_siphash/test.ha index dc18906489de1a0e6b5bc5186cda879a634b1cd7..6c228f06e9dc4195ae1438dc6ee8d2af598ae9aa 100644 --- a/ds/map/hashmap_siphash/test.ha +++ b/ds/map/hashmap_siphash/test.ha @@ -15,7 +15,7 @@ }; }; @test fn test() void = { - const buckets: [_]size = [128z, 256z]; + const buckets: [_]size = [64z, 128z]; const makers: [_]*fn() (*map::map | nomem) = [&mk_slice_basic]; let key1: [16]u8 = [0...]; diff --git a/ds/map/slice_basic/test.ha b/ds/map/slice_basic/test.ha index df9090e13a330863053671ac8639583c220cea35..161e3df088aa7037ceead2fe871a607113c96cab 100644 --- a/ds/map/slice_basic/test.ha +++ b/ds/map/slice_basic/test.ha @@ -1,10 +1,10 @@ use ds::map; -@test fn test_2000() void = { +@test fn test() void = { let m: *map = match (new()) { case let p: *map => yield p; case nomem => abort("slice_basic: nomem"); }; defer finish(m); - map::stress_test(m, 2000); + map::stress_test(m, 8000); }; diff --git a/ds/map/slice_sorted/test.ha b/ds/map/slice_sorted/test.ha index 59d12521d36c5003c44530f57daf44bf10f55885..db0e09abfb040d5e745b4ad80438b25b059acd54 100644 --- a/ds/map/slice_sorted/test.ha +++ b/ds/map/slice_sorted/test.ha @@ -1,10 +1,10 @@ use ds::map; -@test fn test_2000() void = { +@test fn test() void = { let m: *map = match (new()) { case let p: *map => yield p; case nomem => abort("slice_sorted: nomem"); }; defer finish(m); - map::stress_test(m, 2000); + map::stress_test(m, 8000); }; diff --git a/ds/map/swiss/test.ha b/ds/map/swiss/test.ha index 262d1fcc01ef7ef1abea567693144b33fa6db886..b95eee5db1518d295c79584387657aa067b26b43 100644 --- a/ds/map/swiss/test.ha +++ b/ds/map/swiss/test.ha @@ -19,7 +19,7 @@ }; }; @test fn test() void = { - const groups: [3]size = [1z, 17z, 128z]; + const groups: [_]size = [64z, 128z]; for (let gi = 0z; gi < len(groups); gi += 1) { let m = match (new(groups[gi], &testhash, null)) { diff --git a/ds/map/swiss_fnv/test.ha b/ds/map/swiss_fnv/test.ha index 3ca1486057682bf1e83b6fc3ed20f4ae38876238..959aaf652ad3e9ef2a336e5cbc4f1edb412e827a 100644 --- a/ds/map/swiss_fnv/test.ha +++ b/ds/map/swiss_fnv/test.ha @@ -2,7 +2,7 @@ use ds::map; use errors; @test fn test() void = { - const groups: [2]size = [1z, 32z]; + const groups: [_]size = [64z, 128z]; for (let gi = 0z; gi < len(groups); gi += 1) { let m: *map = match (new(groups[gi])) { @@ -11,6 +11,6 @@ case errors::invalid => abort("swiss_fnv: invalid groups"); case nomem => abort("swiss_fnv: nomem"); }; defer finish(m); - map::stress_test(m, 200000); + map::stress_test(m, 20000); }; }; diff --git a/ds/map/swiss_siphash/test.ha b/ds/map/swiss_siphash/test.ha index 989d20a3143d093ca0ba243f5ee4ccc983e48b70..589c8eae27526c01f3aa6db44303f4b880d2d5c8 100644 --- a/ds/map/swiss_siphash/test.ha +++ b/ds/map/swiss_siphash/test.ha @@ -8,7 +8,7 @@ let key2: [16]u8 = [0...]; random::buffer(&key1); random::buffer(&key2); - const groups: [2]size = [1z, 32z]; + const groups: [_]size = [64z, 128z]; const keys: [2]*[16]u8 = [&key1, &key2]; for (let gi = 0z; gi < len(groups); gi += 1) { -- 2.48.1