// ArduinoJson - https://arduinojson.org // Copyright © 2014-2024, Benoit BLANCHON // MIT License #include #include TEST_CASE("JsonObject::isNull()") { SECTION("returns true") { JsonObject obj; REQUIRE(obj.isNull() == true); } SECTION("returns false") { JsonDocument doc; JsonObject obj = doc.to(); REQUIRE(obj.isNull() == false); } } TEST_CASE("JsonObject::operator bool()") { SECTION("returns false") { JsonObject obj; REQUIRE(static_cast(obj) == false); } SECTION("returns true") { JsonDocument doc; JsonObject obj = doc.to(); REQUIRE(static_cast(obj) == true); } }