mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-15 19:42:12 +02:00
This commit is contained in:
@ -76,17 +76,10 @@ TEST_CASE("JsonObject::printTo()") {
|
||||
check(obj, "{\"a\":[1,2],\"b\":[4,5]}");
|
||||
}
|
||||
|
||||
SECTION("TwoDoublesFourDigits") {
|
||||
obj["a"] = double_with_n_digits(3.14159265358979323846, 4);
|
||||
obj.set("b", 2.71828182845904523536, 4);
|
||||
obj.set("c", double_with_n_digits(3.14159265358979323846, 3));
|
||||
check(obj, "{\"a\":3.1416,\"b\":2.7183,\"c\":3.142}");
|
||||
}
|
||||
|
||||
SECTION("TwoDoubleDefaultDigits") {
|
||||
obj["a"] = 3.14159265358979323846;
|
||||
obj.set("b", 2.71828182845904523536);
|
||||
check(obj, "{\"a\":3.14,\"b\":2.72}");
|
||||
SECTION("Two doubles") {
|
||||
obj["a"] = 12.34;
|
||||
obj.set("b", 56.78);
|
||||
check(obj, "{\"a\":12.34,\"b\":56.78}");
|
||||
}
|
||||
|
||||
SECTION("TwoNull") {
|
||||
|
Reference in New Issue
Block a user