summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 7cff65e..9c030d0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -329,21 +329,21 @@ mod tests {
use super::*;
#[test]
- fn empty_iterator() {
+ fn map_empty_iterator() {
assert!(std::iter::empty()
.map_parallel_limit(5, 7, |i: i32| 2 * i)
.eq(std::iter::empty()));
}
#[test]
- fn unit_iterator() {
+ fn map_unit_iterator() {
assert!(std::iter::once(1)
.map_parallel_limit(5, 7, |i| 2 * i)
.eq(std::iter::once(2)));
}
#[test]
- fn preserves_order_with_multiple_threads() {
+ fn map_with_multiple_threads() {
assert!((0..100)
.into_iter()
.map_parallel_limit(5, 7, |i| {
@@ -354,7 +354,7 @@ mod tests {
}
#[test]
- fn preserves_order_with_single_thread() {
+ fn map_with_single_thread() {
assert!((0..100)
.into_iter()
.map_parallel_limit(1, 7, |i| {
@@ -365,7 +365,7 @@ mod tests {
}
#[test]
- fn preserves_order_with_zero_threads() {
+ fn map_with_zero_threads() {
assert!((0..100)
.into_iter()
.map_parallel_limit(0, 7, |i| {
@@ -376,7 +376,7 @@ mod tests {
}
#[test]
- fn preserves_order_with_zero_buffer_size() {
+ fn map_with_zero_buffer_size() {
assert!((0..100)
.into_iter()
.map_parallel_limit(5, 0, |i| {
@@ -387,7 +387,7 @@ mod tests {
}
#[test]
- fn does_not_fuse() {
+ fn map_does_not_fuse() {
let mut i = 0;
let mut iter = std::iter::from_fn(move || {
i += 1;
@@ -407,7 +407,7 @@ mod tests {
}
#[test]
- fn is_lazy() {
+ fn map_is_lazy() {
let _iter = (0..10)
.into_iter()
.map_parallel_limit(5, 7, |_| panic!("eager evaluation"));
@@ -416,7 +416,7 @@ mod tests {
#[test]
#[should_panic]
#[ntest::timeout(1000)]
- fn propagates_panic() {
+ fn map_propagates_panic() {
let _ = (0..100)
.into_iter()
.map_parallel_limit(5, 7, |i| {
@@ -450,7 +450,7 @@ mod tests {
}
#[test]
- fn indices_wrap() {
+ fn map_wraps_item_indices() {
let mut map = ParallelMap::new(0..100, 5, 7, |i| {
std::thread::sleep(Duration::from_millis((i % 3) * 10));
2 * i
Generated by cgit. See skreutz.com for my tech blog and contact information.