Add a stub for shallowCopy()

This commit is contained in:
Benoit Blanchon
2023-08-09 15:19:15 +02:00
parent 2f31c932d7
commit 53d54ba9d7
3 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,14 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>
#include <catch.hpp>
TEST_CASE("shallowCopy()") {
JsonDocument doc1, doc2;
doc1["b"] = "c";
doc2["a"].shallowCopy(doc1);
REQUIRE(doc2.as<std::string>() == "{\"a\":{\"b\":\"c\"}}");
}