forked from bblanchon/ArduinoJson
Store the strings in the heap
This commit is contained in:
@ -10,6 +10,11 @@ TEST_CASE("VariantData") {
|
||||
true);
|
||||
}
|
||||
|
||||
TEST_CASE("StringNode") {
|
||||
REQUIRE(std::is_standard_layout<ArduinoJson::detail::StringNode>::value ==
|
||||
true);
|
||||
}
|
||||
|
||||
TEST_CASE("JsonVariant from JsonArray") {
|
||||
SECTION("JsonArray is null") {
|
||||
JsonArray arr;
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include <ArduinoJson.h>
|
||||
#include <catch.hpp>
|
||||
|
||||
#include "Allocators.hpp"
|
||||
|
||||
enum ErrorCode { ERROR_01 = 1, ERROR_10 = 10 };
|
||||
|
||||
TEST_CASE("JsonVariant::set() when there is enough memory") {
|
||||
@ -128,7 +130,7 @@ TEST_CASE("JsonVariant::set() when there is enough memory") {
|
||||
}
|
||||
|
||||
TEST_CASE("JsonVariant::set() with not enough memory") {
|
||||
JsonDocument doc(1);
|
||||
JsonDocument doc(1, FailingAllocator::instance());
|
||||
|
||||
JsonVariant v = doc.to<JsonVariant>();
|
||||
|
||||
|
Reference in New Issue
Block a user