diff --git a/src/runtime2/store/mod.rs b/src/runtime2/store/mod.rs index 2280851592f0825f9e3a253f27090f01eb44c38d..e5bc5f7fe36343e731f085ddf0304e04170c5b25 100644 --- a/src/runtime2/store/mod.rs +++ b/src/runtime2/store/mod.rs @@ -1,31 +1,9 @@ +#[macro_use] +#[cfg(test)] +mod tests; + pub mod component; pub mod unfair_se_lock; pub mod queue_mpsc; -pub(crate) use component::ComponentStore; - -#[cfg(test)] -mod tests { - use std::sync::Arc; - use std::sync::atomic::{AtomicU64, Ordering}; - - // Utility resource structure that counts the number of constructors and - // destructor calls. - pub struct Resource { - dtor: Arc, - val: u64, - } - - impl Resource { - fn new(ctor: Arc, dtor: Arc, val: u64) -> Self { - ctor.fetch_add(1, Ordering::SeqCst); - return Self{ dtor, val }; - } - } - - impl Drop for Resource { - fn drop(&mut self) { - self.dtor.fetch_add(1, Ordering::SeqCst); - } - } -} \ No newline at end of file +pub(crate) use component::ComponentStore; \ No newline at end of file