Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Crayon2000 committed Nov 4, 2022
1 parent 262b9eb commit a0a43bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ TEST_CASE("message equality non equal lhs empty", "[message]")

TEST_CASE("message rebuild with size", "[message]")
{
zmq::message_t msg();
zmq::message_t msg;
msg.rebuild(5)
CHECK(msg.size() == 5);
}

#if defined(ZMQ_CPP11) && !defined(ZMQ_CPP11_PARTIAL)
TEST_CASE("message rebuild with string literal", "[message]")
{
zmq::message_t hi_msg();
zmq::message_t hi_msg;
hi_msg.rebuild("Hi")
REQUIRE(2u == hi_msg.size());
CHECK(0 == memcmp(data, hi_msg.data(), 2));
Expand All @@ -200,7 +200,7 @@ TEST_CASE("message rebuild with strings", "[message]")
SECTION("string")
{
const std::string hi(data);
zmq::message_t hi_msg();
zmq::message_t hi_msg;
hi_msg.rebuild(hi)
CHECK(2u == hi_msg.size());
CHECK(0 == memcmp(data, hi_msg.data(), 2));
Expand All @@ -209,7 +209,7 @@ TEST_CASE("message rebuild with strings", "[message]")
SECTION("string_view")
{
const std::string_view hi(data);
zmq::message_t hi_msg();
zmq::message_t hi_msg;
hi_msg.rebuild(hi)
CHECK(2u == hi_msg.size());
CHECK(0 == memcmp(data, hi_msg.data(), 2));
Expand Down

0 comments on commit a0a43bf

Please sign in to comment.