Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: Source/wtf/TreeNodeTest.cpp

Issue 128823002: Get rid of the overloads on templated traversal methods for clarity and safety (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/wtf/TreeNode.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/TreeNodeTest.cpp
diff --git a/Source/wtf/TreeNodeTest.cpp b/Source/wtf/TreeNodeTest.cpp
index f7a2ab0fe8e4586956dad4b25ee369c28d9491ac..018933ea854f9237e2833c8a49394ce774dd49f1 100644
--- a/Source/wtf/TreeNodeTest.cpp
+++ b/Source/wtf/TreeNodeTest.cpp
@@ -195,7 +195,7 @@ TEST(WTF, TreeNodeTraverseNext)
};
unsigned orderIndex = 0;
- for (TestTree* node = trio.root.get(); node; node = traverseNext(*node), orderIndex++)
+ for (TestTree* node = trio.root.get(); node; node = traverseNext<TestTree>(*node), orderIndex++)
ASSERT_EQ(node, order[orderIndex]);
ASSERT_EQ(orderIndex, sizeof(order) / sizeof(TestTree*));
}
@@ -212,7 +212,7 @@ TEST(WTF, TreeNodeTraverseNextPostORder)
};
unsigned orderIndex = 0;
- for (TestTree* node = traverseFirstPostOrder(*trio.root.get()); node; node = traverseNextPostOrder(*node), orderIndex++)
+ for (TestTree* node = traverseFirstPostOrder<TestTree>(*trio.root.get()); node; node = traverseNextPostOrder<TestTree>(*node), orderIndex++)
ASSERT_EQ(node, order[orderIndex]);
ASSERT_EQ(orderIndex, sizeof(order) / sizeof(TestTree*));
« no previous file with comments | « Source/wtf/TreeNode.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698