"git@developer.sourcefind.cn:cnjsdfcy/simbricks.git" did not exist on "b72b8a520a53566ee5b0df670179a7d49890e03a"
Commit 5c390e8d authored by Jesse Beder's avatar Jesse Beder
Browse files

Merge pull request #303 from bdutro/patch-1-squashed

Fix compiler error by updating node_data::remove to use new equals() method.
parents 908d38eb aa928b92
......@@ -133,7 +133,7 @@ inline bool node_data::remove(const Key& key, shared_memory_holder pMemory) {
return false;
for (node_map::iterator it = m_map.begin(); it != m_map.end(); ++it) {
if (equals(*it->first, key, pMemory)) {
if (it->first->equals(key, pMemory)) {
m_map.erase(it);
return true;
}
......
......@@ -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;
......
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