mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-13 22:50:19 +02:00
Support MSVC cli.
MSVC CLI defined their own nullptr and provides for __nullptr for standard C++11. https://msdn.microsoft.com/en-us/library/4ex65770.aspx msgpack-c introduce MSGPACK_NULLPTR for internal use, it is defined as __nullptr only if compiled on C++ CLI otherwise defined as nullptr.
This commit is contained in:
@@ -170,7 +170,7 @@ TEST(unpack, int_pointer_off_no_ref_explicit)
|
||||
std::size_t off = 0;
|
||||
|
||||
// obsolete
|
||||
msgpack::unpack(&oh, sbuf.data(), sbuf.size(), &off, nullptr);
|
||||
msgpack::unpack(&oh, sbuf.data(), sbuf.size(), &off, MSGPACK_NULLPTR);
|
||||
EXPECT_EQ(1, oh.get().as<int>());
|
||||
EXPECT_EQ(off, sbuf.size());
|
||||
}
|
||||
@@ -183,7 +183,7 @@ TEST(unpack, int_pointer_no_off_ref)
|
||||
bool referenced;
|
||||
|
||||
// obsolete
|
||||
msgpack::unpack(&oh, sbuf.data(), sbuf.size(), nullptr, &referenced);
|
||||
msgpack::unpack(&oh, sbuf.data(), sbuf.size(), MSGPACK_NULLPTR, &referenced);
|
||||
EXPECT_EQ(1, oh.get().as<int>());
|
||||
EXPECT_EQ(false, referenced);
|
||||
}
|
||||
|
Reference in New Issue
Block a user