Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,16 @@ TEST_CASE("message constructor with char array", "[message]")
CHECK(0 == memcmp(data, hi_msg.data(), 2));
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#if defined(ZMQ_CPP11) && !defined(ZMQ_CPP11_PARTIAL)
TEST_CASE("message constructor with container - deprecated", "[message]")
{
zmq::message_t hi_msg("Hi"); // deprecated
REQUIRE(3u == hi_msg.size());
CHECK(0 == memcmp(data, hi_msg.data(), 3));
}
#pragma GCC diagnostic pop

TEST_CASE("message constructor with container of trivial data", "[message]")
{
Expand Down Expand Up @@ -189,11 +192,14 @@ TEST_CASE("message to string", "[message]")
CHECK(b.to_string_view() == "Foo");
#endif

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#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
#pragma GCC diagnostic pop
}

TEST_CASE("message to debug string", "[message]")
Expand Down
5 changes: 4 additions & 1 deletion tests/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ TEST_CASE("socket check integral options", "[socket]")
"router_mandatory", true);
#endif
#ifdef ZMQ_ROUTER_RAW
check_integral_opt<int>(zmq::sockopt::router_raw, router, "router_raw",
check_integral_opt<int>(zmq::sockopt::router_raw, router, "router_raw",
true);
#endif
#ifdef ZMQ_ROUTER_NOTIFY
Expand Down Expand Up @@ -619,9 +619,12 @@ TEST_CASE("socket send recv message_t by pointer", "[socket]")
CHECK(*res_send == 10);
CHECK(smsg.size() == 0);

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
zmq::message_t rmsg;
const bool res = s.recv(&rmsg);
CHECK(res);
#pragma GCC diagnostic pop
}

TEST_CASE("socket recv dontwait", "[socket]")
Expand Down
Loading