forked from bblanchon/ArduinoJson
Add more tests for JsonVariantConst
This commit is contained in:
1 parent
ca0dda7ac1
commit
315cc722e9
14 files changed
+391
-262
No files matched your search
@@ -251,17 +251,6 @@ TEST_CASE("JsonVariant::as()") {
|
||||
}
|
||||
#endif
|
||||
|
||||
SECTION("should work on JsonVariantConst") {
|
||||
variant.set("hello");
|
||||
|
||||
JsonVariantConst cvar = variant;
|
||||
|
||||
REQUIRE(cvar.as<bool>() == true);
|
||||
REQUIRE(cvar.as<long>() == 0L);
|
||||
REQUIRE(cvar.as<const char*>() == std::string("hello"));
|
||||
REQUIRE(cvar.as<std::string>() == std::string("hello"));
|
||||
}
|
||||
|
||||
SECTION("as<enum>()") {
|
||||
variant.set(1);
|
||||
|
||||
|
||||
Reference in new issue
Block a user