reset locale (for #272)

This commit is contained in:
Niels 2016-06-28 19:18:23 +02:00
parent 420659f187
commit 7214243d89
3 changed files with 15 additions and 3 deletions

View file

@ -14079,9 +14079,15 @@ TEST_CASE("regression tests")
CHECK(j1a.dump() == "23.42");
CHECK(j1b.dump() == "23.42");
// check if locale is properly reset
std::stringstream ss;
ss.imbue(std::locale(std::locale(), new CommaDecimalSeparator));
ss << 47.11;
CHECK(ss.str() == "47,11");
ss << j1a;
CHECK(ss.str() == "23.42");
CHECK(ss.str() == "47,1123.42");
ss << 47.11;
CHECK(ss.str() == "47,1123.4247,11");
CHECK(j2a.dump() == "23.42");
//issue #230