Skip to content

Commit 3f8f0f9

Browse files
refact: parking loom tests
1 parent 7f9d8e9 commit 3f8f0f9

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/parking/mutex.rs

+7-12
Original file line numberDiff line numberDiff line change
@@ -336,40 +336,35 @@ mod test {
336336
#[cfg(all(loom, test))]
337337
mod model {
338338
use crate::loom::models;
339+
use crate::parking::{immediate, yields};
339340

340341
#[test]
341342
fn try_lock_join_immediate_park() {
342-
use crate::parking::immediate::Mutex;
343-
models::try_lock_join::<Mutex<_>>();
343+
models::try_lock_join::<immediate::Mutex<_>>();
344344
}
345345

346346
#[test]
347347
fn lock_join_immediate_park() {
348-
use crate::parking::immediate::Mutex;
349-
models::lock_join::<Mutex<_>>();
348+
models::lock_join::<immediate::Mutex<_>>();
350349
}
351350

352351
#[test]
353352
fn mixed_lock_join_immediate_park() {
354-
use crate::parking::immediate::Mutex;
355-
models::mixed_lock_join::<Mutex<_>>();
353+
models::mixed_lock_join::<immediate::Mutex<_>>();
356354
}
357355

358356
#[test]
359357
fn try_lock_join_yield_than_park() {
360-
use crate::parking::yields::Mutex;
361-
models::try_lock_join::<Mutex<_>>();
358+
models::try_lock_join::<yields::Mutex<_>>();
362359
}
363360

364361
#[test]
365362
fn lock_join_yield_than_park() {
366-
use crate::parking::yields::Mutex;
367-
models::lock_join::<Mutex<_>>();
363+
models::lock_join::<yields::Mutex<_>>();
368364
}
369365

370366
#[test]
371367
fn mixed_lock_join_yield_than_park() {
372-
use crate::parking::yields::Mutex;
373-
models::mixed_lock_join::<Mutex<_>>();
368+
models::mixed_lock_join::<yields::Mutex<_>>();
374369
}
375370
}

0 commit comments

Comments
 (0)