Fixed error expected unqualified-id on GCC 11 (fixes #1622)

This commit is contained in:
Benoit Blanchon
2021-08-03 11:39:02 +02:00
parent 1b74ad0731
commit f570fe8c37
6 changed files with 48 additions and 3 deletions

View File

@ -0,0 +1,15 @@
#include <ArduinoJson.h>
#include <catch.hpp>
#include <string>
TEST_CASE("C++20 smoke test") {
StaticJsonDocument<128> doc;
deserializeJson(doc, "{\"hello\":\"world\"}");
REQUIRE(doc["hello"] == "world");
std::string json;
serializeJson(doc, json);
REQUIRE(json == "{\"hello\":\"world\"}");
}