make main into a test

This commit is contained in:
Quaternions 2023-10-04 02:22:45 -07:00
parent 928654c7df
commit 6fc585e01e

View File

@ -38,7 +38,8 @@ impl Worker {
type Task = String;
fn main() {
#[test]
fn test_worker() {
let (sender, receiver) = mpsc::channel::<Task>();
let receiver = Arc::new((Mutex::new(receiver), Condvar::new()));
let is_active = Arc::new(AtomicBool::new(true));