Update to ArduinoJson 7.0.4

This commit is contained in:
iranl
2024-04-19 14:44:01 +02:00
parent 1378732081
commit 81be0a689a
444 changed files with 10842 additions and 9422 deletions

View File

@@ -7,21 +7,19 @@
using namespace std;
TEST_CASE("std::swap") {
SECTION("DynamicJsonDocument*") {
DynamicJsonDocument *p1, *p2;
SECTION("JsonDocument*") {
JsonDocument *p1, *p2;
swap(p1, p2); // issue #1678
}
SECTION("DynamicJsonDocument") {
DynamicJsonDocument doc1(0x10), doc2(0x20);
SECTION("JsonDocument") {
JsonDocument doc1, doc2;
doc1.set("hello");
doc2.set("world");
swap(doc1, doc2);
CHECK(doc1.capacity() == 0x20);
CHECK(doc1.as<string>() == "world");
CHECK(doc2.capacity() == 0x10);
CHECK(doc2.as<string>() == "hello");
}
}