File tree 1 file changed +14
-6
lines changed
1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -181,28 +181,36 @@ TEST_CASE("message equality non equal lhs empty", "[message]")
181
181
182
182
TEST_CASE (" message rebuild with size" , " [message]" )
183
183
{
184
- const zmq::message_t msg () ;
185
- msg.rebuild (5 )
184
+ zmq::message_t msg;
185
+ msg.rebuild (5 );
186
186
CHECK (msg.size () == 5 );
187
187
}
188
188
189
189
#if defined(ZMQ_CPP11) && !defined(ZMQ_CPP11_PARTIAL)
190
+ TEST_CASE (" message rebuild with string literal" , " [message]" )
191
+ {
192
+ zmq::message_t hi_msg;
193
+ hi_msg.rebuild (" Hi" );
194
+ REQUIRE (2u == hi_msg.size ());
195
+ CHECK (0 == memcmp (data, hi_msg.data (), 2 ));
196
+ }
197
+
190
198
TEST_CASE (" message rebuild with strings" , " [message]" )
191
199
{
192
200
SECTION (" string" )
193
201
{
194
202
const std::string hi (data);
195
- zmq::message_t hi_msg () ;
196
- hi_msg.rebuild (hi)
203
+ zmq::message_t hi_msg;
204
+ hi_msg.rebuild (hi);
197
205
CHECK (2u == hi_msg.size ());
198
206
CHECK (0 == memcmp (data, hi_msg.data (), 2 ));
199
207
}
200
208
#if CPPZMQ_HAS_STRING_VIEW
201
209
SECTION (" string_view" )
202
210
{
203
211
const std::string_view hi (data);
204
- zmq::message_t hi_msg () ;
205
- hi_msg.rebuild (hi)
212
+ zmq::message_t hi_msg;
213
+ hi_msg.rebuild (hi);
206
214
CHECK (2u == hi_msg.size ());
207
215
CHECK (0 == memcmp (data, hi_msg.data (), 2 ));
208
216
}
You can’t perform that action at this time.
0 commit comments