diff --git a/src/worker.rs b/src/worker.rs index afaa3a3..e16164a 100644 --- a/src/worker.rs +++ b/src/worker.rs @@ -38,7 +38,8 @@ impl Worker { type Task = String; -fn main() { +#[test] +fn test_worker() { let (sender, receiver) = mpsc::channel::(); let receiver = Arc::new((Mutex::new(receiver), Condvar::new())); let is_active = Arc::new(AtomicBool::new(true));