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

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

Issue 521643002: Fix Node::ReplaceUses to handle unused nodes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | « src/compiler/generic-node-inl.h ('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 6fe8573a2f78b3218ab51bc0b3cfcd47f9dd3e1a..da10d250f92457974403b2955d26cd49abdfd89d 100644
--- a/test/cctest/compiler/test-node.cc
+++ b/test/cctest/compiler/test-node.cc
@@ -118,9 +118,14 @@ TEST(NodeUseIteratorOne) {
TEST(NodeUseIteratorReplaceNoUses) {
GraphTester graph;
Node* n0 = graph.NewNode(&dummy_operator);
- Node* n3 = graph.NewNode(&dummy_operator);
- n0->ReplaceUses(n3);
+ Node* n1 = graph.NewNode(&dummy_operator);
+ Node* n2 = graph.NewNode(&dummy_operator);
+ Node* n3 = graph.NewNode(&dummy_operator, n2);
+ n0->ReplaceUses(n1);
+ CHECK(n0->uses().begin() == n0->uses().end());
+ n0->ReplaceUses(n2);
CHECK(n0->uses().begin() == n0->uses().end());
+ USE(n3);
}
« no previous file with comments | « src/compiler/generic-node-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698