From 1ccde3f3246d8a2a7af8f9571d729da91fc4feb1 Mon Sep 17 00:00:00 2001 From: Fred Nicolson Date: Mon, 14 Jan 2019 13:38:35 +0000 Subject: [PATCH] Fix tests --- tests/SocketTest.cpp | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/tests/SocketTest.cpp b/tests/SocketTest.cpp index 9ef1aa0..1aab310 100644 --- a/tests/SocketTest.cpp +++ b/tests/SocketTest.cpp @@ -8,25 +8,14 @@ TEST(SocketTest, status_to_string_valid) { ASSERT_EQ(fr::Socket::status_to_string(fr::Socket::Status::Unknown), "Unknown"); - ASSERT_EQ(fr::Socket::status_to_string(fr::Socket::Status::HttpBodyTooBig), "HTTP body too big"); + ASSERT_EQ(fr::Socket::status_to_string(fr::Socket::Status::HttpBodyTooBig), "HTTP Body Too Big"); } TEST(SocketTest, status_to_string_invalid) { - try - { - auto str = fr::Socket::status_to_string(static_cast(-1)); - } - catch(const std::logic_error &) - { - try - { - auto str = fr::Socket::status_to_string(static_cast(99999)); - } - catch(const std::logic_error &) - { - return; - } - } - ASSERT_TRUE(false); + + auto str = fr::Socket::status_to_string(static_cast(-1)); + ASSERT_EQ(str, "Unknown"); + str = fr::Socket::status_to_string(static_cast(99999)); + ASSERT_EQ(str, "Unknown"); } \ No newline at end of file