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