diff --git a/daemon/tests/daemon_test.cpp b/daemon/tests/daemon_test.cpp index 0fdf473..318c833 100644 --- a/daemon/tests/daemon_test.cpp +++ b/daemon/tests/daemon_test.cpp @@ -116,7 +116,7 @@ struct Client { std::pair get_config() { auto res = cli_.Get("/api/config"); BOOST_REQUIRE_MESSAGE(res != nullptr, "server returned response"); - return std::make_pair(res->status == 200, res->body); + return {res->status == 200, res->body}; } bool set_ptp_config(int domain, int dscp) { @@ -130,13 +130,13 @@ struct Client { std::pair get_ptp_status() { auto res = cli_.Get("/api/ptp/status"); BOOST_REQUIRE_MESSAGE(res != nullptr, "server returned response"); - return std::make_pair(res->status == 200, res->body); + return {res->status == 200, res->body}; } std::pair get_ptp_config() { auto res = cli_.Get("/api/ptp/config"); BOOST_REQUIRE_MESSAGE(res != nullptr, "server returned response"); - return std::make_pair(res->status == 200, res->body); + return {res->status == 200, res->body}; } bool add_source(int id) { @@ -189,35 +189,35 @@ struct Client { std::string url = std::string("/api/source/sdp/") + std::to_string(id); auto res = cli_.Get(url.c_str()); BOOST_REQUIRE_MESSAGE(res != nullptr, "server returned response"); - return std::make_pair(res->status == 200, res->body); + return {res->status == 200, res->body}; } std::pair get_sink_status(int id) { std::string url = std::string("/api/sink/status/") + std::to_string(id); auto res = cli_.Get(url.c_str()); BOOST_REQUIRE_MESSAGE(res != nullptr, "server returned response"); - return std::make_pair(res->status == 200, res->body); + return {res->status == 200, res->body}; } std::pair get_streams() { std::string url = std::string("/api/streams"); auto res = cli_.Get(url.c_str()); BOOST_REQUIRE_MESSAGE(res != nullptr, "server returned response"); - return std::make_pair(res->status == 200, res->body); + return {res->status == 200, res->body}; } std::pair get_sources() { std::string url = std::string("/api/sources"); auto res = cli_.Get(url.c_str()); BOOST_REQUIRE_MESSAGE(res != nullptr, "server returned response"); - return std::make_pair(res->status == 200, res->body); + return {res->status == 200, res->body}; } std::pair get_sinks() { std::string url = std::string("/api/sinks"); auto res = cli_.Get(url.c_str()); BOOST_REQUIRE_MESSAGE(res != nullptr, "server returned response"); - return std::make_pair(res->status == 200, res->body); + return {res->status == 200, res->body}; } bool remove_source(int id) { @@ -334,14 +334,14 @@ struct Client { std::string url = std::string("/api/browse/sources/sap"); auto res = cli_.Get(url.c_str()); BOOST_REQUIRE_MESSAGE(res != nullptr, "server returned response"); - return std::make_pair(res->status == 200, res->body); + return {res->status == 200, res->body}; } std::pair get_remote_mdns_sources() { std::string url = std::string("/api/browse/sources/mdns"); auto res = cli_.Get(url.c_str()); BOOST_REQUIRE_MESSAGE(res != nullptr, "server returned response"); - return std::make_pair(res->status == 200, res->body); + return {res->status == 200, res->body}; } bool wait_for_remote_mdns_sources(int num) {