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

Unified Diff: test/cctest/compiler/test-graph-visualizer.cc

Issue 1115603003: [test] Remove deprecated cctest/test-node-algorithm tests. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
Index: test/cctest/compiler/test-graph-visualizer.cc
diff --git a/test/cctest/compiler/test-graph-visualizer.cc b/test/cctest/compiler/test-graph-visualizer.cc
index 702e99db154e46ae063241e46f33e030e9a3cc3b..2d6338d06059305f1cbd23c4631f99ea2091afb5 100644
--- a/test/cctest/compiler/test-graph-visualizer.cc
+++ b/test/cctest/compiler/test-graph-visualizer.cc
@@ -20,6 +20,10 @@
using namespace v8::internal;
using namespace v8::internal::compiler;
+static Operator dummy_operator(IrOpcode::kParameter, Operator::kNoWrite,
+ "dummy", 0, 0, 0, 1, 0, 0);
+
+
TEST(NodeWithNullInputReachableFromEnd) {
HandleAndZoneScope scope;
Graph graph(scope.main_zone());
@@ -93,3 +97,31 @@ TEST(NodeWithNullControlReachableFromStart) {
SourcePositionTable table(&graph);
os << AsJSON(graph, &table);
}
+
+
+TEST(NodeNetworkOfDummiesReachableFromEnd) {
+ HandleAndZoneScope scope;
+ Graph graph(scope.main_zone());
+ CommonOperatorBuilder common(scope.main_zone());
+
+ Node* start = graph.NewNode(common.Start(0));
+ graph.SetStart(start);
+ Node* n2 = graph.NewNode(&dummy_operator, graph.start());
+ Node* n3 = graph.NewNode(&dummy_operator, graph.start());
+ Node* n4 = graph.NewNode(&dummy_operator, n2);
+ Node* n5 = graph.NewNode(&dummy_operator, n2);
+ Node* n6 = graph.NewNode(&dummy_operator, n3);
+ Node* n7 = graph.NewNode(&dummy_operator, n3);
+ Node* n8 = graph.NewNode(&dummy_operator, n5);
+ Node* n9 = graph.NewNode(&dummy_operator, n5);
+ Node* n10 = graph.NewNode(&dummy_operator, n9);
+ Node* n11 = graph.NewNode(&dummy_operator, n9);
+ Node* end_dependencies[6] = {n4, n8, n10, n11, n6, n7};
+ Node* end = graph.NewNode(&dummy_operator, 6, end_dependencies);
+ graph.SetEnd(end);
+
+ OFStream os(stdout);
+ os << AsDOT(graph);
+ SourcePositionTable table(&graph);
+ os << AsJSON(graph, &table);
+}

Powered by Google App Engine
This is Rietveld 408576698