mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 16:14:05 +01:00
Renamed function RawJson() to serialized()
This commit is contained in:
@@ -70,4 +70,14 @@ TEST_CASE("serialize MsgPack object") {
|
||||
//
|
||||
// check(object, expected);
|
||||
// }
|
||||
|
||||
SECTION("serialized(const char*)") {
|
||||
object["hello"] = serialized("\xDB\x00\x01\x00\x00", 5);
|
||||
check(object, "\x81\xA5hello\xDB\x00\x01\x00\x00");
|
||||
}
|
||||
|
||||
SECTION("serialized(std::string)") {
|
||||
object["hello"] = serialized(std::string("\xDB\x00\x01\x00\x00", 5));
|
||||
check(object, "\x81\xA5hello\xDB\x00\x01\x00\x00");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,4 +126,9 @@ TEST_CASE("serialize MsgPack value") {
|
||||
std::string shortest(65536, '?');
|
||||
check(shortest.c_str(), std::string("\xDB\x00\x01\x00\x00", 5) + shortest);
|
||||
}
|
||||
|
||||
SECTION("serialized(const char*)") {
|
||||
check(serialized("\xDA\xFF\xFF"), "\xDA\xFF\xFF");
|
||||
check(serialized("\xDB\x00\x01\x00\x00", 5), "\xDB\x00\x01\x00\x00");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user