forked from bblanchon/ArduinoJson
Change string copy policy: only string literal are stored by pointer
This commit is contained in:
1 parent
5f8e3c0f0f
commit
594dc707cb
27 files changed
+456
-197
No files matched your search
@@ -139,7 +139,8 @@ TEST_CASE("serialize MsgPack value") {
|
||||
|
||||
SECTION("str 32") {
|
||||
std::string shortest(65536, '?');
|
||||
checkVariant(shortest.c_str(), "\xDB\x00\x01\x00\x00"_s + shortest);
|
||||
checkVariant(JsonString(shortest.c_str(), true), // force store by pointer
|
||||
"\xDB\x00\x01\x00\x00"_s + shortest);
|
||||
}
|
||||
|
||||
SECTION("serialized(const char*)") {
|
||||
|
||||
Reference in new issue
Block a user