1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-28 12:02:00 +03:00

🚨 fixed some warnings #821

This commit is contained in:
Niels Lohmann
2017-11-25 22:06:18 +01:00
parent ea5aed0769
commit 430f03512c
3 changed files with 14 additions and 13 deletions

View File

@ -1019,14 +1019,14 @@ TEST_CASE("value conversion")
SECTION("std::array is larger than JSON")
{
std::array<int, 6> arr6 = {1, 2, 3, 4, 5, 6};
std::array<int, 6> arr6 = {{1, 2, 3, 4, 5, 6}};
CHECK_THROWS_AS(arr6 = j1, json::out_of_range);
CHECK_THROWS_WITH(arr6 = j1, "[json.exception.out_of_range.401] array index 4 is out of range");
}
SECTION("std::array is smaller than JSON")
{
std::array<int, 2> arr2 = {8, 9};
std::array<int, 2> arr2 = {{8, 9}};
arr2 = j1;
CHECK(arr2[0] == 1);
CHECK(arr2[1] == 2);

View File

@ -1309,7 +1309,7 @@ TEST_CASE("regression tests")
SECTION("issue #843 - converting to array not working")
{
json j;
std::array<int, 4> ar = {1, 1, 1, 1};
std::array<int, 4> ar = {{1, 1, 1, 1}};
j = ar;
ar = j;
}