mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-02 08:48:27 +01:00
as<int>()
This commit is contained in:
@@ -323,4 +323,12 @@ TEST_CASE("JsonVariant::as()") {
|
||||
CHECK(o.isNull() == true);
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("linked int") {
|
||||
StaticJsonDocument<128> doc2;
|
||||
doc2.set(42);
|
||||
variant.link(doc2);
|
||||
|
||||
CHECK(variant.as<int>() == 42);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user