Extracted VariantData and CollectionData classes

This commit is contained in:
Benoit Blanchon
2018-12-07 09:16:58 +01:00
parent 1ad97ebf85
commit b77b203935
45 changed files with 1129 additions and 1007 deletions

View File

@ -22,7 +22,25 @@ TEST_CASE("JsonObject::operator==()") {
REQUIRE_FALSE(obj1c == obj2c);
}
SECTION("should return false when objs differ") {
SECTION("should return false when LHS has more elements") {
obj1["hello"] = "coucou";
obj1["world"] = 666;
obj2["hello"] = "coucou";
REQUIRE_FALSE(obj1 == obj2);
REQUIRE_FALSE(obj1c == obj2c);
}
SECTION("should return false when RKS has more elements") {
obj1["hello"] = "coucou";
obj2["hello"] = "coucou";
obj2["world"] = 666;
REQUIRE_FALSE(obj1 == obj2);
REQUIRE_FALSE(obj1c == obj2c);
}
SECTION("should return true when objs equal") {
obj1["hello"] = "world";
obj1["anwser"] = 42;
// insert in different order