Serialize float with less decimal places than double

This commit is contained in:
Benoit Blanchon
2024-09-03 11:44:35 +02:00
parent 65ba36622c
commit 3b6bf45b8a
8 changed files with 103 additions and 92 deletions
@@ -83,6 +83,11 @@ TEST_CASE("serializeJson(JsonVariant)") {
check(3.1415927, "3.1415927");
}
SECTION("Float") {
REQUIRE(sizeof(float) == 4);
check(3.1415927f, "3.141593");
}
SECTION("Zero") {
check(0, "0");
}