Skip to content

Commit

Permalink
🚧 try to fix some warnings in MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Feb 20, 2017
1 parent f7075be commit 1a6d7f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/src/unit-cbor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ TEST_CASE("CBOR regressions", "[!throws]")
SECTION("improve code coverage")
{
// exotic edge case
CHECK_THROWS_AS(json::check_length(0xffffffffffffffff, 0xfffffffffffffff0, 0xff), std::out_of_range);
CHECK_THROWS_AS(json::check_length(0xffffffffffffffffull, 0xfffffffffffffff0ull, 0xff), std::out_of_range);
}
}

Expand Down
4 changes: 2 additions & 2 deletions test/src/unit-concepts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ TEST_CASE("concepts")
// X::size_type must return an unsigned integer
CHECK((std::is_unsigned<json::size_type>::value));
// X::size_type can represent any non-negative value of X::difference_type
CHECK(std::numeric_limits<json::difference_type>::max() <=
std::numeric_limits<json::size_type>::max());
CHECK(static_cast<size_t>(std::numeric_limits<json::difference_type>::max()) <=
static_cast<size_t>(std::numeric_limits<json::size_type>::max()));

// the expression "X u" has the post-condition "u.empty()"
{
Expand Down
2 changes: 1 addition & 1 deletion test/src/unit-msgpack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ TEST_CASE("MessagePack")
numbers.push_back(-65536);
numbers.push_back(-77777);
numbers.push_back(-1048576);
numbers.push_back(-2147483648);
numbers.push_back(-2147483648ll);
for (auto i : numbers)
{
CAPTURE(i);
Expand Down

0 comments on commit 1a6d7f5

Please sign in to comment.