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

Unified Diff: test/cctest/compiler/test-node.cc

Issue 765983002: Clean up node iteration (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment Created 6 years, 1 month 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
Index: test/cctest/compiler/test-node.cc
diff --git a/test/cctest/compiler/test-node.cc b/test/cctest/compiler/test-node.cc
index 5ac2e4a68360d78134a3cf39fd3bb03a9f7df634..cc848e2f628c4f0f409fdb0d06eb02f369e3b14c 100644
--- a/test/cctest/compiler/test-node.cc
+++ b/test/cctest/compiler/test-node.cc
@@ -93,10 +93,8 @@ TEST(NodeInputIteratorOne) {
TEST(NodeUseIteratorEmpty) {
GraphTester graph;
Node* n1 = graph.NewNode(&dummy_operator);
- Node::Uses::iterator i(n1->uses().begin());
int use_count = 0;
- for (; i != n1->uses().end(); ++i) {
- Node::Edge edge(i.edge());
+ for (auto const edge : n1->use_edges()) {
USE(edge);
use_count++;
}
@@ -366,31 +364,31 @@ TEST(AppendInputsAndIterator) {
Node* n1 = graph.NewNode(&dummy_operator, n0);
Node* n2 = graph.NewNode(&dummy_operator, n0, n1);
- Node::Inputs inputs(n2->inputs());
- Node::Inputs::iterator current = inputs.begin();
+ auto inputs(n2->input_edges());
+ auto current = inputs.begin();
CHECK(current != inputs.end());
- CHECK(*current == n0);
+ CHECK((*current).to() == n0);
++current;
CHECK(current != inputs.end());
- CHECK(*current == n1);
+ CHECK((*current).to() == n1);
++current;
CHECK(current == inputs.end());
Node* n3 = graph.NewNode(&dummy_operator);
n2->AppendInput(graph.zone(), n3);
- inputs = n2->inputs();
+ inputs = n2->input_edges();
current = inputs.begin();
CHECK(current != inputs.end());
- CHECK(*current == n0);
- CHECK_EQ(0, current.index());
+ CHECK((*current).to() == n0);
+ CHECK_EQ(0, (*current).index());
++current;
CHECK(current != inputs.end());
- CHECK(*current == n1);
- CHECK_EQ(1, current.index());
+ CHECK((*current).to() == n1);
+ CHECK_EQ(1, (*current).index());
++current;
CHECK(current != inputs.end());
- CHECK(*current == n3);
- CHECK_EQ(2, current.index());
+ CHECK((*current).to() == n3);
+ CHECK_EQ(2, (*current).index());
++current;
CHECK(current == inputs.end());
}
« src/compiler/control-reducer.cc ('K') | « test/cctest/compiler/test-control-reducer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698