From adb8fa4d44cdc7305c5276e9e32e3a1fa11a6b22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Blanchon?= Date: Mon, 7 Jul 2014 13:28:31 +0200 Subject: [PATCH] Set a default value for DIGITS --- JsonGenerator/JsonValue.h | 2 +- JsonGeneratorTests/JsonValueTests.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/JsonGenerator/JsonValue.h b/JsonGenerator/JsonValue.h index fb3ad903..0e1af089 100644 --- a/JsonGenerator/JsonValue.h +++ b/JsonGenerator/JsonValue.h @@ -46,7 +46,7 @@ namespace ArduinoJson content.asString = value; } - template + template void set(double value) { printToImpl = &printDoubleTo; diff --git a/JsonGeneratorTests/JsonValueTests.cpp b/JsonGeneratorTests/JsonValueTests.cpp index 01386b09..ae4d9cfb 100644 --- a/JsonGeneratorTests/JsonValueTests.cpp +++ b/JsonGeneratorTests/JsonValueTests.cpp @@ -73,12 +73,12 @@ namespace JsonGeneratorTests write("\t"); assertResultIs("\"\\t\""); } - /* + TEST_METHOD(DoubleDefaultDigits) { write(3.14159265358979323846); assertResultIs("3.14"); - }*/ + } TEST_METHOD(DoubleZeroDigits) {