@@ -69,13 +69,20 @@ TEST_CASE("message constructor with char array", "[message]")
6969 CHECK (0 == memcmp (data, hi_msg.data (), 2 ));
7070}
7171
72+ #ifndef _WIN32
73+ #pragma GCC diagnostic push
74+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
75+ #endif
7276#if defined(ZMQ_CPP11) && !defined(ZMQ_CPP11_PARTIAL)
7377TEST_CASE (" message constructor with container - deprecated" , " [message]" )
7478{
7579 zmq::message_t hi_msg (" Hi" ); // deprecated
7680 REQUIRE (3u == hi_msg.size ());
7781 CHECK (0 == memcmp (data, hi_msg.data (), 3 ));
7882}
83+ #ifndef _WIN32
84+ #pragma GCC diagnostic pop
85+ #endif
7986
8087TEST_CASE (" message constructor with container of trivial data" , " [message]" )
8188{
@@ -189,11 +196,18 @@ TEST_CASE("message to string", "[message]")
189196 CHECK (b.to_string_view () == " Foo" );
190197#endif
191198
199+ #ifndef _WIN32
200+ #pragma GCC diagnostic push
201+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
202+ #endif
192203#if defined(ZMQ_CPP11) && !defined(ZMQ_CPP11_PARTIAL)
193204 const zmq::message_t depr (" Foo" ); // deprecated
194205 CHECK (depr.to_string () != " Foo" );
195206 CHECK (depr.to_string () == std::string (" Foo" , 4 ));
196207#endif
208+ #ifndef _WIN32
209+ #pragma GCC diagnostic pop
210+ #endif
197211}
198212
199213TEST_CASE (" message to debug string" , " [message]" )
0 commit comments