From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/crossbeam/tests/subcrates.rs | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 vendor/crossbeam/tests/subcrates.rs (limited to 'vendor/crossbeam/tests') diff --git a/vendor/crossbeam/tests/subcrates.rs b/vendor/crossbeam/tests/subcrates.rs new file mode 100644 index 000000000..21b99fb0e --- /dev/null +++ b/vendor/crossbeam/tests/subcrates.rs @@ -0,0 +1,47 @@ +//! Makes sure subcrates are properly re-exported. + +use crossbeam::select; + +#[test] +fn channel() { + let (s, r) = crossbeam::channel::bounded(1); + + select! { + send(s, 0) -> res => res.unwrap(), + recv(r) -> res => assert!(res.is_ok()), + } +} + +#[test] +fn deque() { + let w = crossbeam::deque::Worker::new_fifo(); + w.push(1); + let _ = w.pop(); +} + +#[test] +fn epoch() { + crossbeam::epoch::pin(); +} + +#[test] +fn queue() { + let a = crossbeam::queue::ArrayQueue::new(10); + let _ = a.push(1); + let _ = a.pop(); +} + +#[test] +fn utils() { + crossbeam::utils::CachePadded::new(7); + + crossbeam::scope(|scope| { + scope.spawn(|_| ()); + }) + .unwrap(); + + crossbeam::thread::scope(|scope| { + scope.spawn(|_| ()); + }) + .unwrap(); +} -- cgit v1.2.3