Set a default value for DIGITS

This commit is contained in:
Benoît Blanchon
2014-07-07 13:28:31 +02:00
parent 3b6ce65054
commit adb8fa4d44
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ namespace ArduinoJson
content.asString = value;
}
template<int DIGITS>
template<int DIGITS=2>
void set(double value)
{
printToImpl = &printDoubleTo<DIGITS>;

View File

@ -73,12 +73,12 @@ namespace JsonGeneratorTests
write("\t");
assertResultIs("\"\\t\"");
}
/*
TEST_METHOD(DoubleDefaultDigits)
{
write(3.14159265358979323846);
assertResultIs("3.14");
}*/
}
TEST_METHOD(DoubleZeroDigits)
{