#[test]
fn return_to_queue() {
let (tx, rx) = sigq::new();
tx.push("hello").unwrap();
tx.push("world").unwrap();
let s = rx.pop_managed().unwrap();
assert_eq!(*s, "hello");
drop(s);
let s = rx.pop().unwrap();
assert_eq!(s, "hello");
}
#[test]
fn finalize() {
let (tx, rx) = sigq::new();
tx.push("hello").unwrap();
tx.push("world").unwrap();
let s = rx.pop_managed().unwrap();
assert_eq!(*s, "hello");
s.handled();
let s = rx.pop().unwrap();
assert_eq!(s, "world");
assert!(rx.was_empty());
}