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 |