mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-24 06:04:44 +02:00
Merge pull request #378 from whoshuu/add-nil-pack-test
Add test for packing/unpacking nil
This commit is contained in:
commit
ea991d5a01
@ -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)
|
TEST(MSGPACK, simple_buffer_true)
|
||||||
{
|
{
|
||||||
msgpack::sbuffer sbuf;
|
msgpack::sbuffer sbuf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user