diff --git a/tests/message.cpp b/tests/message.cpp index 645d806..9052507 100644 --- a/tests/message.cpp +++ b/tests/message.cpp @@ -69,6 +69,10 @@ TEST_CASE("message constructor with char array", "[message]") CHECK(0 == memcmp(data, hi_msg.data(), 2)); } +#ifndef _WIN32 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif #if defined(ZMQ_CPP11) && !defined(ZMQ_CPP11_PARTIAL) TEST_CASE("message constructor with container - deprecated", "[message]") { @@ -76,6 +80,9 @@ TEST_CASE("message constructor with container - deprecated", "[message]") REQUIRE(3u == hi_msg.size()); CHECK(0 == memcmp(data, hi_msg.data(), 3)); } +#ifndef _WIN32 +#pragma GCC diagnostic pop +#endif TEST_CASE("message constructor with container of trivial data", "[message]") { @@ -189,11 +196,18 @@ TEST_CASE("message to string", "[message]") CHECK(b.to_string_view() == "Foo"); #endif +#ifndef _WIN32 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif #if defined(ZMQ_CPP11) && !defined(ZMQ_CPP11_PARTIAL) const zmq::message_t depr("Foo"); // deprecated CHECK(depr.to_string() != "Foo"); CHECK(depr.to_string() == std::string("Foo", 4)); #endif +#ifndef _WIN32 +#pragma GCC diagnostic pop +#endif } TEST_CASE("message to debug string", "[message]") diff --git a/tests/socket.cpp b/tests/socket.cpp index ddc2d4d..fd9cc64 100644 --- a/tests/socket.cpp +++ b/tests/socket.cpp @@ -365,7 +365,7 @@ TEST_CASE("socket check integral options", "[socket]") "router_mandatory", true); #endif #ifdef ZMQ_ROUTER_RAW - check_integral_opt(zmq::sockopt::router_raw, router, "router_raw", + check_integral_opt(zmq::sockopt::router_raw, router, "router_raw", true); #endif #ifdef ZMQ_ROUTER_NOTIFY @@ -619,9 +619,16 @@ TEST_CASE("socket send recv message_t by pointer", "[socket]") CHECK(*res_send == 10); CHECK(smsg.size() == 0); +#ifndef _WIN32 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif zmq::message_t rmsg; const bool res = s.recv(&rmsg); CHECK(res); +#ifndef _WIN32 +#pragma GCC diagnostic pop +#endif } TEST_CASE("socket recv dontwait", "[socket]")