Skip to content

Commit

Permalink
🚑 fix for #500
Browse files Browse the repository at this point in the history
Removed a check that already failed in MSVC.
  • Loading branch information
nlohmann committed Mar 14, 2017
1 parent 84072fb commit bfe4788
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions test/src/unit-regression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,16 +460,6 @@ TEST_CASE("regression tests")
{
setlocale(LC_NUMERIC, "de_DE.UTF-8");

// Verify that snprintf uses special decimal and grouping characters.
// Disabled, because can't trigger locale-specific behavior in AppVeyor
#ifndef _MSC_VER
{
std::array<char, 64> buf;
std::snprintf(buf.data(), buf.size(), "%.2f", 12345.67);
CHECK(strcmp(buf.data(), "12345,67") == 0);
}
#endif

// verify that dumped correctly with '.' and no grouping
const json j1 = 12345.67;
CHECK(json(12345.67).dump() == "12345.67");
Expand All @@ -480,18 +470,6 @@ TEST_CASE("regression tests")
{
setlocale(LC_NUMERIC, "de_DE.UTF-8");

// disabled, because locale-specific beharivor is not
// triggered in AppVeyor for some reason
#ifndef _MSC_VER
{
// verify that strtod now uses commas as decimal-separator
CHECK(std::strtod("3,14", nullptr) == 3.14);

// verify that strtod does not understand dots as decimal separator
CHECK(std::strtod("3.14", nullptr) == 3);
}
#endif

// verify that parsed correctly despite using strtod internally
CHECK(json::parse("3.14").get<double>() == 3.14);

Expand Down

0 comments on commit bfe4788

Please sign in to comment.