diff --git a/include/etl/private/to_string_helper.h b/include/etl/private/to_string_helper.h index ea91bf12..0b7d123a 100644 --- a/include/etl/private/to_string_helper.h +++ b/include/etl/private/to_string_helper.h @@ -270,11 +270,11 @@ namespace etl //*************************************************************************** template void add_integral_and_fractional(const uint64_t integral, - const uint64_t fractional, - TIString& str, - const etl::basic_format_spec& integral_format, - const etl::basic_format_spec& fractional_format, - const bool negative) + const uint64_t fractional, + TIString& str, + const etl::basic_format_spec& integral_format, + const etl::basic_format_spec& fractional_format, + const bool negative) { typedef typename TIString::value_type type; diff --git a/test/test_to_string.cpp b/test/test_to_string.cpp index 3b62bf5b..0b3ed974 100644 --- a/test/test_to_string.cpp +++ b/test/test_to_string.cpp @@ -598,15 +598,15 @@ namespace } //************************************************************************* - TEST(test_double_formatting_10_decimal_point) + TEST(test_double_formatting_15_decimal_point) { etl::string<20> result_d; - double value_d = 1.2345; + double value_d = 1.234567890123456; - Format format = Format().precision(10); + Format format = Format().precision(15); etl::to_string(value_d, result_d, format); - CHECK_EQUAL(etl::string<20>(STR("1.2345000000")).c_str(), result_d.c_str()); + CHECK_EQUAL(etl::string<20>(STR("1.234567890123456")).c_str(), result_d.c_str()); } //*************************************************************************