mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-15 11:36:36 +02:00
Add overload JsonObjectSuscript::set(value, decimals)
(issue #143)
This commit is contained in:
@ -46,6 +46,14 @@ TEST_(StoreDouble) {
|
||||
EXPECT_FALSE(_object["hello"].is<long>());
|
||||
}
|
||||
|
||||
TEST_(StoreDoubleWithDigits) {
|
||||
_object.set("hello", 123.45, 2);
|
||||
|
||||
EXPECT_EQ(123.45, _object["hello"].as<double>());
|
||||
EXPECT_TRUE(_object["hello"].is<double>());
|
||||
EXPECT_FALSE(_object["hello"].is<long>());
|
||||
}
|
||||
|
||||
TEST_(StoreBoolean) {
|
||||
_object.set("hello", true);
|
||||
|
||||
|
Reference in New Issue
Block a user