Skip to content

Commit 4491015

Browse files
committed
speed up cargo miri test
by making some "exhaustive" tests less exhaustive
1 parent 97ac129 commit 4491015

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/indexmap.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,12 @@ mod tests {
12081208
assert_eq!(a.get("k1"), a.get("k2"));
12091209
}
12101210

1211+
// tests that use this constant take too long to run under miri, specially on CI, with a map of
1212+
// this size so make the map smaller when using miri
1213+
#[cfg(not(miri))]
12111214
const MAP_SLOTS: usize = 4096;
1215+
#[cfg(miri)]
1216+
const MAP_SLOTS: usize = 64;
12121217
fn almost_filled_map() -> FnvIndexMap<usize, usize, MAP_SLOTS> {
12131218
let mut almost_filled = FnvIndexMap::new();
12141219
for i in 1..MAP_SLOTS {

0 commit comments

Comments
 (0)