mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-13 22:50:19 +02:00
Add test for packing/unpacking nil
This commit is contained in:
@@ -278,6 +278,16 @@ TEST(MSGPACK, simple_buffer_double)
|
||||
}
|
||||
}
|
||||
|
||||
TEST(MSGPACK, simple_buffer_nil)
|
||||
{
|
||||
msgpack::sbuffer sbuf;
|
||||
msgpack::packer<msgpack::sbuffer> packer(sbuf);
|
||||
packer.pack_nil();
|
||||
msgpack::unpacked ret;
|
||||
msgpack::unpack(ret, sbuf.data(), sbuf.size());
|
||||
EXPECT_EQ(ret.get().type, msgpack::type::NIL);
|
||||
}
|
||||
|
||||
TEST(MSGPACK, simple_buffer_true)
|
||||
{
|
||||
msgpack::sbuffer sbuf;
|
||||
|
Reference in New Issue
Block a user