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

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 windows build Created 6 years 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 | « test/cctest/compiler/test-control-reducer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-node.cc
diff --git a/test/cctest/compiler/test-node.cc b/test/cctest/compiler/test-node.cc
index 36a9b4994ea9e8864789a619b4d7d4d10dc4b67e..eafabd35780e2710a3371f7ed772b70a1d4824a1 100644
--- a/test/cctest/compiler/test-node.cc
+++ b/test/cctest/compiler/test-node.cc
@@ -92,10 +92,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 (Edge const edge : n1->use_edges()) {
USE(edge);
use_count++;
}
@@ -365,31 +363,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();
+ Node::InputEdges inputs(n2->input_edges());
+ Node::InputEdges::iterator 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());
}
« no previous file with comments | « 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