// ArduinoJson - https://arduinojson.org // Copyright © 2014-2024, Benoit BLANCHON // MIT License #include #include #include TEST_CASE("JsonVariantConst::as()") { JsonDocument doc; JsonVariantConst var = doc.to(); doc.set("hello"); REQUIRE(var.as() == true); REQUIRE(var.as() == 0L); REQUIRE(var.as() == std::string("hello")); REQUIRE(var.as() == std::string("hello")); }