From 620311219548909239d9358dae08275ea780a4af Mon Sep 17 00:00:00 2001 From: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Fri, 17 Dec 2021 12:52:18 -0800 Subject: [PATCH] added a test that making a stream should fail --- src/tests/main_tests.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tests/main_tests.rs b/src/tests/main_tests.rs index ae383da..da24d53 100644 --- a/src/tests/main_tests.rs +++ b/src/tests/main_tests.rs @@ -24,3 +24,9 @@ fn create_and_connect_to_listener() { drop(listener); } +#[test] +#[should_panic] +fn panic_no_listener() { + let _outgoing = std::net::TcpStream::connect("localhost:5000").unwrap(); +} +