2019-02-15 13:29:30 +01:00
|
|
|
#define ARDUINOJSON_DECODE_UNICODE 0
|
|
|
|
#include <ArduinoJson.h>
|
|
|
|
|
|
|
|
#include <catch.hpp>
|
|
|
|
|
|
|
|
TEST_CASE("ARDUINOJSON_DECODE_UNICODE == 0") {
|
2023-03-20 10:49:01 +01:00
|
|
|
JsonDocument doc(2048);
|
2019-02-15 13:29:30 +01:00
|
|
|
DeserializationError err = deserializeJson(doc, "\"\\uD834\\uDD1E\"");
|
|
|
|
|
2021-02-18 19:40:11 +01:00
|
|
|
REQUIRE(err == DeserializationError::Ok);
|
|
|
|
REQUIRE(doc.as<std::string>() == "\\uD834\\uDD1E");
|
2019-02-15 13:29:30 +01:00
|
|
|
}
|