1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added a trailing decimal when serialising integer valued doubles

This commit is contained in:
Tom Poole 2019-03-21 17:50:11 +00:00
parent a1dc1b1fce
commit 0d019acd1c
4 changed files with 39 additions and 33 deletions

View file

@ -1195,20 +1195,20 @@ public:
Identifier number ("number");
std::map<double, String> tests;
tests[1] = "1";
tests[1] = "1.0";
tests[1.1] = "1.1";
tests[1.01] = "1.01";
tests[0.76378] = "0.76378";
tests[-10] = "-10";
tests[-10] = "-10.0";
tests[10.01] = "10.01";
tests[0.0123] = "0.0123";
tests[-3.7e-27] = "-3.7e-27";
tests[1e+40] = "1e40";
tests[1e+40] = "1.0e40";
tests[-12345678901234567.0] = "-1.234567890123457e16";
tests[192000] = "192000";
tests[192000] = "192000.0";
tests[1234567] = "1.234567e6";
tests[0.00006] = "0.00006";
tests[0.000006] = "6e-6";
tests[0.000006] = "6.0e-6";
for (auto& test : tests)
{