diff --git a/test/test_to_string.cpp b/test/test_to_string.cpp index 76e1c52d..84a42d61 100644 --- a/test/test_to_string.cpp +++ b/test/test_to_string.cpp @@ -287,6 +287,9 @@ namespace str.assign(STR("Result ")); CHECK(etl::string<20>(STR("Result -12.345678 ")) == etl::to_string(-12.345678, str, Format().precision(6).width(11).left(), true)); + + str.assign(STR("Result ")); + CHECK(etl::string<20>(STR("Result -0.123456 ")) == etl::to_string(-0.123456, str, Format().precision(6).width(10).left(), true)); } //************************************************************************* diff --git a/test/test_to_u16string.cpp b/test/test_to_u16string.cpp index cd8ca3fb..215a44de 100644 --- a/test/test_to_u16string.cpp +++ b/test/test_to_u16string.cpp @@ -260,6 +260,9 @@ namespace CHECK(etl::u16string<20>(STR(" -12.345678")) == etl::to_string(-12.345678, str, Format().precision(6).width(11).right())); CHECK(etl::u16string<20>(STR("-12.345678 ")) == etl::to_string(-12.345678, str, Format().precision(6).width(11).left())); + + CHECK(etl::u16string<20>(STR(" -0.123456")) == etl::to_string(-0.123456, str, Format().precision(6).width(10).right())); + CHECK(etl::u16string<20>(STR("-0.123456 ")) == etl::to_string(-0.123456, str, Format().precision(6).width(10).left())); } //************************************************************************* @@ -278,6 +281,9 @@ namespace str.assign(STR("Result ")); CHECK(etl::u16string<20>(STR("Result -12.345678 ")) == etl::to_string(-12.345678, str, Format().precision(6).width(11).left(), true)); + + str.assign(STR("Result ")); + CHECK(etl::u16string<20>(STR("Result -0.123456 ")) == etl::to_string(-0.123456, str, Format().precision(6).width(10).left(), true)); } //************************************************************************* diff --git a/test/test_to_u32string.cpp b/test/test_to_u32string.cpp index a45ac9c1..919a4153 100644 --- a/test/test_to_u32string.cpp +++ b/test/test_to_u32string.cpp @@ -263,6 +263,9 @@ namespace CHECK(etl::u32string<20>(STR(" -12.345678")) == etl::to_string(-12.345678, str, Format().precision(6).width(11).right())); CHECK(etl::u32string<20>(STR("-12.345678 ")) == etl::to_string(-12.345678, str, Format().precision(6).width(11).left())); + + CHECK(etl::u32string<20>(STR(" -0.123456")) == etl::to_string(-0.123456, str, Format().precision(6).width(10).right())); + CHECK(etl::u32string<20>(STR("-0.123456 ")) == etl::to_string(-0.123456, str, Format().precision(6).width(10).left())); } //************************************************************************* @@ -281,6 +284,9 @@ namespace str.assign(STR("Result ")); CHECK(etl::u32string<20>(STR("Result -12.345678 ")) == etl::to_string(-12.345678, str, Format().precision(6).width(11).left(), true)); + + str.assign(STR("Result ")); + CHECK(etl::u32string<20>(STR("Result -0.123456 ")) == etl::to_string(-0.123456, str, Format().precision(6).width(10).left(), true)); } //************************************************************************* diff --git a/test/test_to_wstring.cpp b/test/test_to_wstring.cpp index 1d3ec8fc..1a99c62c 100644 --- a/test/test_to_wstring.cpp +++ b/test/test_to_wstring.cpp @@ -264,6 +264,9 @@ namespace CHECK(etl::wstring<20>(STR(" -12.345678")) == etl::to_string(-12.345678, str, Format().precision(6).width(11).right())); CHECK(etl::wstring<20>(STR("-12.345678 ")) == etl::to_string(-12.345678, str, Format().precision(6).width(11).left())); + + CHECK(etl::wstring<20>(STR(" -0.123456")) == etl::to_string(-0.123456, str, Format().precision(6).width(10).right())); + CHECK(etl::wstring<20>(STR("-0.123456 ")) == etl::to_string(-0.123456, str, Format().precision(6).width(10).left())); } //************************************************************************* @@ -282,6 +285,9 @@ namespace str.assign(STR("Result ")); CHECK(etl::wstring<20>(STR("Result -12.345678 ")) == etl::to_string(-12.345678, str, Format().precision(6).width(11).left(), true)); + + str.assign(STR("Result ")); + CHECK(etl::wstring<20>(STR("Result -0.123456 ")) == etl::to_string(-0.123456, str, Format().precision(6).width(10).left(), true)); } //*************************************************************************