Update node_data::remove to use new equals() method

- Update the call to equals() in node_data::remove() to match the new implementation
- Add unit test for node::remove() to catch this type of bug in the future
This commit is contained in:
bdutro
2015-04-01 16:58:44 -05:00
committed by Brett Dutro
parent 25c466a152
commit aa928b925b
2 changed files with 8 additions and 1 deletions

View File

@@ -39,6 +39,13 @@ TEST(NodeTest, SimpleAppendSequence) {
EXPECT_TRUE(node.IsSequence());
}
TEST(NodeTest, MapElementRemoval) {
Node node;
node["foo"] = "bar";
node.remove("foo");
EXPECT_TRUE(!node["foo"]);
}
TEST(NodeTest, SimpleAssignSequence) {
Node node;
node[0] = 10;