Files

15 lines
318 B
C++
Raw Permalink Normal View History

2023-08-09 15:19:15 +02:00
// ArduinoJson - https://arduinojson.org
2026-07-06 18:35:16 +02:00
// Copyright © 2014-2026, Benoit BLANCHON
2023-08-09 15:19:15 +02:00
// 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\"}}");
}