Renamed undocumented function isUndefined() to isUnbound()

This commit is contained in:
Benoit Blanchon
2021-12-16 14:55:26 +01:00
parent e16767af92
commit 0f529a3587
15 changed files with 26 additions and 24 deletions

View File

@ -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"];