Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
polazarus committed Nov 9, 2024
1 parent a73ca39 commit 512e9a5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/smart/tests.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#[cfg(not(loom))]
use std::{sync, thread};
mod sync {
pub use alloc::sync::*;
pub use core::sync::*;
#[cfg(feature = "std")]
pub use std::sync::mpsc;
}

#[cfg(feature = "std")]
use std::thread;

#[cfg(loom)]
use loom::{sync, thread};
Expand Down Expand Up @@ -289,6 +297,7 @@ fn loom_atomic_mt_clone_move_and_drop() {
}

#[test]
#[cfg(any(loom, feature = "std"))]
fn test_atomic_mt_orderly_drop() {
let (tx, rx) = sync::mpsc::channel();
let num = T::new(0);
Expand All @@ -312,6 +321,7 @@ fn loom_atomic_mt_orderly_drop() {
}

#[test]
#[cfg(any(loom, feature = "std"))]
fn test_atomic_mt_orderly_drop2() {
let witness = atomic_witness::Witness::default();
let n0 = T::new(witness.clone());
Expand Down

0 comments on commit 512e9a5

Please sign in to comment.