Skip to content

Commit

Permalink
Fix a bug in unit-test to_chars
Browse files Browse the repository at this point in the history
The size of "long" datatype depends on the platform.
Use std::int64_t instead to explicitly specify a 64 bit integer.

More info: https://en.cppreference.com/w/cpp/language/types
  • Loading branch information
nickaein committed Jan 3, 2019
1 parent efd5279 commit 1d0cc87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/src/unit-to_chars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ TEST_CASE("formatting")

SECTION("integer")
{
auto check_integer = [](long number, const std::string & expected)
auto check_integer = [](std::int64_t number, const std::string & expected)
{
nlohmann::json j = number;
CHECK(j.dump() == expected);
Expand Down

0 comments on commit 1d0cc87

Please sign in to comment.