forked from bblanchon/ArduinoJson
Add more tests for JsonObjectConst
This commit is contained in:
1 parent
44d2d47863
commit
08cac13c43
15 files changed
+281
-89
No files matched your search
@@ -18,19 +18,6 @@ TEST_CASE("JsonObject::isNull()") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("JsonObjectConst::isNull()") {
|
||||
SECTION("returns true") {
|
||||
JsonObjectConst obj;
|
||||
REQUIRE(obj.isNull() == true);
|
||||
}
|
||||
|
||||
SECTION("returns false") {
|
||||
JsonDocument doc;
|
||||
JsonObjectConst obj = doc.to<JsonObject>();
|
||||
REQUIRE(obj.isNull() == false);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("JsonObject::operator bool()") {
|
||||
SECTION("returns false") {
|
||||
JsonObject obj;
|
||||
@@ -43,16 +30,3 @@ TEST_CASE("JsonObject::operator bool()") {
|
||||
REQUIRE(static_cast<bool>(obj) == true);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("JsonObjectConst::operator bool()") {
|
||||
SECTION("returns false") {
|
||||
JsonObjectConst obj;
|
||||
REQUIRE(static_cast<bool>(obj) == false);
|
||||
}
|
||||
|
||||
SECTION("returns true") {
|
||||
JsonDocument doc;
|
||||
JsonObjectConst obj = doc.to<JsonObject>();
|
||||
REQUIRE(static_cast<bool>(obj) == true);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user