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

Unified Diff: test/unittests/compiler/graph-unittest.cc

Issue 851263002: [turbofan] Initial attempt to cleanup Node and related classes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « test/cctest/compiler/test-node.cc ('k') | test/unittests/compiler/node-properties-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/graph-unittest.cc
diff --git a/test/unittests/compiler/graph-unittest.cc b/test/unittests/compiler/graph-unittest.cc
index 95432587a825f947f42616c8067c86bff7a03f17..960ff92293946a71100908a37faebab7e47fc08c 100644
--- a/test/unittests/compiler/graph-unittest.cc
+++ b/test/unittests/compiler/graph-unittest.cc
@@ -105,6 +105,26 @@ Node* TypedGraphTest::Parameter(Type* type, int32_t index) {
return node;
}
+
+namespace {
+
+const Operator kDummyOperator(0, Operator::kNoProperties, "Dummy", 0, 0, 0, 1,
+ 0, 0);
+
+} // namespace
+
+
+TEST_F(GraphTest, NewNode) {
+ Node* n0 = graph()->NewNode(&kDummyOperator);
+ Node* n1 = graph()->NewNode(&kDummyOperator);
+ EXPECT_NE(n0, n1);
+ EXPECT_LT(0, n0->id());
+ EXPECT_LT(0, n1->id());
+ EXPECT_NE(n0->id(), n1->id());
+ EXPECT_EQ(&kDummyOperator, n0->op());
+ EXPECT_EQ(&kDummyOperator, n1->op());
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « test/cctest/compiler/test-node.cc ('k') | test/unittests/compiler/node-properties-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698