summaryrefslogtreecommitdiffstats
path: root/tokio-sync/tests/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio-sync/tests/errors.rs')
-rw-r--r--tokio-sync/tests/errors.rs22
1 files changed, 19 insertions, 3 deletions
diff --git a/tokio-sync/tests/errors.rs b/tokio-sync/tests/errors.rs
index 0e56cc1a..129cbfc2 100644
--- a/tokio-sync/tests/errors.rs
+++ b/tokio-sync/tests/errors.rs
@@ -2,12 +2,12 @@
extern crate tokio_sync;
-use tokio_sync::mpsc::error;
-
fn is_error<T: ::std::error::Error + Send + Sync>() {}
#[test]
-fn error_bound() {
+fn mpsc_error_bound() {
+ use tokio_sync::mpsc::error;
+
is_error::<error::RecvError>();
is_error::<error::SendError>();
is_error::<error::TrySendError<()>>();
@@ -15,3 +15,19 @@ fn error_bound() {
is_error::<error::UnboundedSendError>();
is_error::<error::UnboundedTrySendError<()>>();
}
+
+#[test]
+fn oneshot_error_bound() {
+ use tokio_sync::oneshot::error;
+
+ is_error::<error::RecvError>();
+ is_error::<error::TryRecvError>();
+}
+
+#[test]
+fn watch_error_bound() {
+ use tokio_sync::watch::error;
+
+ is_error::<error::RecvError>();
+ is_error::<error::SendError<()>>();
+}