mirror of
https://github.com/nlohmann/json.git
synced 2024-08-20 20:12:26 +02:00
added more test cases
This commit is contained in:
parent
84561d8866
commit
ab1ff9de53
|
@ -6233,6 +6233,13 @@ TEST_CASE("lexicographical comparison operators")
|
||||||
CHECK( (j_values[i] == j_values[j]) == expected[i][j] );
|
CHECK( (j_values[i] == j_values[j]) == expected[i][j] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// comparison with discarded elements
|
||||||
|
json j_discarded(json::value_t::discarded);
|
||||||
|
for (size_t i = 0; i < j_values.size(); ++i)
|
||||||
|
{
|
||||||
|
CHECK( (j_values[i] == j_discarded) == false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION("comparison: not equal")
|
SECTION("comparison: not equal")
|
||||||
|
@ -6275,6 +6282,13 @@ TEST_CASE("lexicographical comparison operators")
|
||||||
CHECK( (j_values[i] < j_values[j]) == expected[i][j] );
|
CHECK( (j_values[i] < j_values[j]) == expected[i][j] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// comparison with discarded elements
|
||||||
|
json j_discarded(json::value_t::discarded);
|
||||||
|
for (size_t i = 0; i < j_values.size(); ++i)
|
||||||
|
{
|
||||||
|
CHECK( (j_values[i] < j_discarded) == false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION("comparison: less than or equal equal")
|
SECTION("comparison: less than or equal equal")
|
||||||
|
|
Loading…
Reference in a new issue