mirror of
https://github.com/nlohmann/json.git
synced 2025-05-09 16:43:52 +00:00
* 💡 add comment regarding #4767 Signed-off-by: Niels Lohmann <mail@nlohmann.me> * ✏️ address review comments Signed-off-by: Niels Lohmann <mail@nlohmann.me> * ✏️ address review comments Signed-off-by: Niels Lohmann <mail@nlohmann.me> --------- Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
parent
dff2b4756c
commit
0a8b48ac6a
@ -139,7 +139,12 @@ TEST_CASE("locale-dependent test (LC_NUMERIC=de_DE)")
|
||||
{
|
||||
std::array<char, 6> buffer = {};
|
||||
CHECK(std::snprintf(buffer.data(), buffer.size(), "%.2f", 12.34) == 5); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
|
||||
CHECK(std::string(buffer.data()) == "12,34");
|
||||
const auto snprintf_result = std::string(buffer.data());
|
||||
if (snprintf_result != "12,34")
|
||||
{
|
||||
CAPTURE(snprintf_result)
|
||||
MESSAGE("To test if number parsing is locale-independent, we set the locale to de_DE. However, on this system, the decimal separator doesn't change to `,` potentially due to a known musl issue (https://github.com/nlohmann/json/issues/4767).");
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("parsing")
|
||||
|
Loading…
x
Reference in New Issue
Block a user