From 2e72b562ceac3ce3338af536cd280cdf9c1aff85 Mon Sep 17 00:00:00 2001 From: Naja Melan Date: Thu, 12 Sep 2019 02:55:20 +0200 Subject: [PATCH] Improve error reporting from tests --- tests/connection_reset.rs | 4 ++-- tests/receive_after_init_close.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/connection_reset.rs b/tests/connection_reset.rs index b94e8d2..a698a1a 100644 --- a/tests/connection_reset.rs +++ b/tests/connection_reset.rs @@ -34,7 +34,7 @@ fn test_close() { let err = client.read_message().unwrap_err(); // now we should get ConnectionClosed match err { Error::ConnectionClosed => {} - _ => panic!("unexpected error"), + _ => panic!("unexpected error: {:?}", err), } }); @@ -51,7 +51,7 @@ fn test_close() { let err = client_handler.read_message().unwrap_err(); // now we should get ConnectionClosed match err { Error::ConnectionClosed => {} - _ => panic!("unexpected error"), + _ => panic!("unexpected error: {:?}", err), } drop(client_handler); diff --git a/tests/receive_after_init_close.rs b/tests/receive_after_init_close.rs index 4cea07c..352020e 100644 --- a/tests/receive_after_init_close.rs +++ b/tests/receive_after_init_close.rs @@ -34,7 +34,7 @@ fn test_receive_after_init_close() { let err = client.read_message().unwrap_err(); // now we should get ConnectionClosed match err { Error::ConnectionClosed => {} - _ => panic!("unexpected error"), + _ => panic!("unexpected error: {:?}", err), } }); @@ -52,7 +52,7 @@ fn test_receive_after_init_close() { let err = client_handler.read_message().unwrap_err(); // now we should get ConnectionClosed match err { Error::ConnectionClosed => {} - _ => panic!("unexpected error"), + _ => panic!("unexpected error: {:?}", err), } drop(client_handler);