mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-23 15:27:30 +02:00
@ -6,6 +6,8 @@
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
add_executable(MixedConfigurationTests
|
||||
decode_unicode_0.cpp
|
||||
decode_unicode_1.cpp
|
||||
use_double_0.cpp
|
||||
use_double_1.cpp
|
||||
use_long_long_0.cpp
|
||||
|
11
test/MixedConfiguration/decode_unicode_0.cpp
Normal file
11
test/MixedConfiguration/decode_unicode_0.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#define ARDUINOJSON_DECODE_UNICODE 0
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
#include <catch.hpp>
|
||||
|
||||
TEST_CASE("ARDUINOJSON_DECODE_UNICODE == 0") {
|
||||
DynamicJsonDocument doc(2048);
|
||||
DeserializationError err = deserializeJson(doc, "\"\\uD834\\uDD1E\"");
|
||||
|
||||
REQUIRE(err == DeserializationError::NotSupported);
|
||||
}
|
11
test/MixedConfiguration/decode_unicode_1.cpp
Normal file
11
test/MixedConfiguration/decode_unicode_1.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#define ARDUINOJSON_DECODE_UNICODE 1
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
#include <catch.hpp>
|
||||
|
||||
TEST_CASE("ARDUINOJSON_DECODE_UNICODE == 1") {
|
||||
DynamicJsonDocument doc(2048);
|
||||
DeserializationError err = deserializeJson(doc, "\"\\uD834\\uDD1E\"");
|
||||
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
}
|
Reference in New Issue
Block a user