Commit ab1ff9de authored by Niels's avatar Niels

added more test cases

parent 84561d88
......@@ -1461,7 +1461,7 @@ TEST_CASE("object inspection")
CHECK(json("Ö").dump() == "\"Ö\"");
CHECK(json("❤️").dump() == "\"❤️\"");
}
SECTION("serialization of discarded element")
{
json j_discarded(json::value_t::discarded);
......@@ -6233,6 +6233,13 @@ TEST_CASE("lexicographical comparison operators")
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")
......@@ -6275,6 +6282,13 @@ TEST_CASE("lexicographical comparison operators")
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")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment