forked from bblanchon/ArduinoJson
1 parent
071f718473
commit
68a13117dc
26 files changed
+393
-34
No files matched your search
@@ -249,4 +249,12 @@ TEST_CASE("JsonObject::operator[]") {
|
||||
REQUIRE(true == obj["hello"]["world"].is<int>());
|
||||
REQUIRE(false == obj["hello"]["world"].is<bool>());
|
||||
}
|
||||
|
||||
SECTION("JsonVariant") {
|
||||
obj["hello"] = "world";
|
||||
doc["key"] = "hello";
|
||||
|
||||
REQUIRE(obj[obj["key"]] == "world");
|
||||
REQUIRE(obj[obj["foo"]] == nullptr);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user