mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-23 15:27:30 +02:00
Renamed undocumented function isUndefined()
to isUnbound()
This commit is contained in:
@ -9,30 +9,30 @@ TEST_CASE("JsonVariant::operator|()") {
|
||||
DynamicJsonDocument doc(4096);
|
||||
JsonVariant variant = doc["value"].to<JsonVariant>();
|
||||
|
||||
SECTION("undefined") {
|
||||
SECTION("undefined | const char*") {
|
||||
SECTION("null") {
|
||||
SECTION("null | const char*") {
|
||||
std::string result = variant | "default";
|
||||
REQUIRE(result == "default");
|
||||
}
|
||||
|
||||
SECTION("undefined | int") {
|
||||
SECTION("null | int") {
|
||||
int result = variant | 42;
|
||||
REQUIRE(result == 42);
|
||||
}
|
||||
|
||||
SECTION("undefined | bool") {
|
||||
SECTION("null | bool") {
|
||||
bool result = variant | true;
|
||||
REQUIRE(result == true);
|
||||
}
|
||||
|
||||
SECTION("undefined | ElementProxy") {
|
||||
SECTION("null | ElementProxy") {
|
||||
doc["array"][0] = 42;
|
||||
|
||||
JsonVariantConst result = variant | doc["array"][0];
|
||||
REQUIRE(result == 42);
|
||||
}
|
||||
|
||||
SECTION("undefined | MemberProxy") {
|
||||
SECTION("null | MemberProxy") {
|
||||
doc["other"] = 42;
|
||||
|
||||
JsonVariantConst result = variant | doc["other"];
|
||||
|
Reference in New Issue
Block a user