diff --git a/src/runtime2/store/component.rs b/src/runtime2/store/component.rs index d93245908fd4587e882f148afe5db432006579bd..58de8ce520ba17e2f8b6a1293226bf4a55e0d2e1 100644 --- a/src/runtime2/store/component.rs +++ b/src/runtime2/store/component.rs @@ -336,6 +336,7 @@ impl Drop for ComponentStore { #[cfg(test)] mod tests { use super::*; + use crate::runtime2::store::tests::Resource; use rand::prelude::*; use rand_pcg::Pcg32; @@ -343,24 +344,6 @@ mod tests { use std::sync::Arc; use std::sync::atomic::{AtomicU64, Ordering}; - 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); - } - } - fn seeds() -> Vec<[u8;16]> { return vec![ [241, 47, 70, 87, 240, 246, 20, 173, 219, 143, 74, 23, 158, 58, 205, 172],