Improve error reporting from tests

pull/72/head
Naja Melan 5 years ago
parent 28579b567a
commit 2e72b562ce
  1. 4
      tests/connection_reset.rs
  2. 4
      tests/receive_after_init_close.rs

@ -34,7 +34,7 @@ fn test_close() {
let err = client.read_message().unwrap_err(); // now we should get ConnectionClosed let err = client.read_message().unwrap_err(); // now we should get ConnectionClosed
match err { match err {
Error::ConnectionClosed => {} 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 let err = client_handler.read_message().unwrap_err(); // now we should get ConnectionClosed
match err { match err {
Error::ConnectionClosed => {} Error::ConnectionClosed => {}
_ => panic!("unexpected error"), _ => panic!("unexpected error: {:?}", err),
} }
drop(client_handler); drop(client_handler);

@ -34,7 +34,7 @@ fn test_receive_after_init_close() {
let err = client.read_message().unwrap_err(); // now we should get ConnectionClosed let err = client.read_message().unwrap_err(); // now we should get ConnectionClosed
match err { match err {
Error::ConnectionClosed => {} 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 let err = client_handler.read_message().unwrap_err(); // now we should get ConnectionClosed
match err { match err {
Error::ConnectionClosed => {} Error::ConnectionClosed => {}
_ => panic!("unexpected error"), _ => panic!("unexpected error: {:?}", err),
} }
drop(client_handler); drop(client_handler);

Loading…
Cancel
Save