diff options
Diffstat (limited to 'src/libstd/sync/mpsc_queue.rs')
| -rw-r--r-- | src/libstd/sync/mpsc_queue.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libstd/sync/mpsc_queue.rs b/src/libstd/sync/mpsc_queue.rs index 258162069d9..b5a55f3f8c9 100644 --- a/src/libstd/sync/mpsc_queue.rs +++ b/src/libstd/sync/mpsc_queue.rs @@ -156,14 +156,15 @@ impl<T: Send> Drop for Queue<T> { mod tests { use prelude::*; - use super::{Queue, Data, Empty, Inconsistent}; use native; + use super::{Queue, Data, Empty, Inconsistent}; + use sync::arc::UnsafeArc; #[test] fn test_full() { let mut q = Queue::new(); - p.push(~1); - p.push(~2); + q.push(~1); + q.push(~2); } #[test] @@ -171,11 +172,11 @@ mod tests { let nthreads = 8u; let nmsgs = 1000u; let mut q = Queue::new(); - match c.pop() { + match q.pop() { Empty => {} Inconsistent | Data(..) => fail!() } - let (port, chan) = SharedChan::new(); + let (port, chan) = Chan::new(); let q = UnsafeArc::new(q); for _ in range(0, nthreads) { |
