@@ -69,13 +69,16 @@ TEST_CASE("message constructor with char array", "[message]")
6969 CHECK (0 == memcmp (data, hi_msg.data (), 2 ));
7070}
7171
72+ #pragma GCC diagnostic push
73+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
7274#if defined(ZMQ_CPP11) && !defined(ZMQ_CPP11_PARTIAL)
7375TEST_CASE (" message constructor with container - deprecated" , " [message]" )
7476{
7577 zmq::message_t hi_msg (" Hi" ); // deprecated
7678 REQUIRE (3u == hi_msg.size ());
7779 CHECK (0 == memcmp (data, hi_msg.data (), 3 ));
7880}
81+ #pragma GCC diagnostic pop
7982
8083TEST_CASE (" message constructor with container of trivial data" , " [message]" )
8184{
@@ -189,11 +192,14 @@ TEST_CASE("message to string", "[message]")
189192 CHECK (b.to_string_view () == " Foo" );
190193#endif
191194
195+ #pragma GCC diagnostic push
196+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
192197#if defined(ZMQ_CPP11) && !defined(ZMQ_CPP11_PARTIAL)
193198 const zmq::message_t depr (" Foo" ); // deprecated
194199 CHECK (depr.to_string () != " Foo" );
195200 CHECK (depr.to_string () == std::string (" Foo" , 4 ));
196201#endif
202+ #pragma GCC diagnostic pop
197203}
198204
199205TEST_CASE (" message to debug string" , " [message]" )
0 commit comments