aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorAria Shrimpton <me@aria.rip>2024-02-27 09:42:49 +0000
committerAria Shrimpton <me@aria.rip>2024-02-27 09:42:49 +0000
commitba36134c01513a8cc1367ed78d4090d91f7a8e70 (patch)
tree0ae91580a5d87047990ef214d8ce599ddf73bc6f /src/tests
parent4944cba55324d2dc603aa8e4c6832e0bf2a87147 (diff)
change example_{mapping,sets} to do 2* as many gets/contains as inserts
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/example_mapping/src/lib.rs2
-rw-r--r--src/tests/example_sets/src/lib.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/example_mapping/src/lib.rs b/src/tests/example_mapping/src/lib.rs
index 335c55c..f9216df 100644
--- a/src/tests/example_mapping/src/lib.rs
+++ b/src/tests/example_mapping/src/lib.rs
@@ -13,7 +13,7 @@ pub fn insert_get(n: usize) {
set.insert(i.to_string(), random());
}
- for i in 0..n * n {
+ for i in 0..2 * n {
black_box(|x| x)(black_box(set.get(&i.to_string())));
}
}
diff --git a/src/tests/example_sets/src/lib.rs b/src/tests/example_sets/src/lib.rs
index 8e6caa5..dff5a27 100644
--- a/src/tests/example_sets/src/lib.rs
+++ b/src/tests/example_sets/src/lib.rs
@@ -14,7 +14,7 @@ pub fn insert_n(n: usize) {
set.insert(random());
}
- for i in 0..n * n {
+ for i in 0..2 * n {
black_box(|x| x)(black_box(set.contains(&i)));
}
}