From ee704fece5ce3189aaa97d060159d97430f4832a Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Mon, 26 Feb 2018 11:04:19 +0100 Subject: [PATCH] Simplify ping-pong test. --- tests/ping-pong.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/ping-pong.cc b/tests/ping-pong.cc index 603cde0..893aeb7 100644 --- a/tests/ping-pong.cc +++ b/tests/ping-pong.cc @@ -14,8 +14,7 @@ int main() resply::Client client; client.connect(); - std::stringstream stream; - stream << client.command("ping"); + auto result{client.command("ping")}; - return stream.str() != "PONG"; + return !(result.type == resply::Result::Type::String && result.string == "PONG"); }