Set a default value for DIGITS

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

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@ namespace ArduinoJson
content.asString = value; content.asString = value;
} }
template<int DIGITS> template<int DIGITS=2>
void set(double value) void set(double value)
{ {
printToImpl = &printDoubleTo<DIGITS>; printToImpl = &printDoubleTo<DIGITS>;
+2 -2
View File
@@ -73,12 +73,12 @@ namespace JsonGeneratorTests
write("\t"); write("\t");
assertResultIs("\"\\t\""); assertResultIs("\"\\t\"");
} }
/*
TEST_METHOD(DoubleDefaultDigits) TEST_METHOD(DoubleDefaultDigits)
{ {
write(3.14159265358979323846); write(3.14159265358979323846);
assertResultIs("3.14"); assertResultIs("3.14");
}*/ }
TEST_METHOD(DoubleZeroDigits) TEST_METHOD(DoubleZeroDigits)
{ {