Commit a744c626 authored by Niels's avatar Niels

made tests independent of "C" locale

parent 0b60d970
......@@ -12383,7 +12383,18 @@ TEST_CASE("regression tests")
json j3b = json::parse("10E3");
json j3c = json::parse("10e3");
std::locale::global(std::locale("de_DE"));
// class to create a locale that would use a comma for decimals
class CommaDecimalSeparator : public std::numpunct<char>
{
protected:
char do_decimal_point() const
{
return ',';
}
};
// change locale to mess with decimal points
std::locale::global(std::locale(std::locale(), new CommaDecimalSeparator));
CHECK(j1a.dump() == "23.42");
CHECK(j1b.dump() == "23.42");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment