Browse Source

[1470] Update test for the const removeIdentical() method

A previous change updated the test for removeIdentical().  This
change was omitted from the test for the const version.
Stephen Morris 13 years ago
parent
commit
ad1fd67bc7
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/lib/cc/tests/data_unittests.cc

+ 5 - 0
src/lib/cc/tests/data_unittests.cc

@@ -573,6 +573,11 @@ TEST(Element, constRemoveIdentical) {
     c = Element::fromJSON("{ \"a\": { \"b\": \"c\" } }");
     EXPECT_EQ(*removeIdentical(a, b), *c);
 
+    a = Element::fromJSON("{ \"a\": 1, \"b\": 2, \"c\": 3 }");
+    b = Element::fromJSON("{ \"c\": 3, \"b\": 2 }");
+    c = Element::fromJSON("{ \"a\": 1 }");
+    EXPECT_EQ(*removeIdentical(a, b), *c);
+
     EXPECT_THROW(removeIdentical(Element::create(1), Element::create(2)),
                  TypeError);
 }