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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "test/unittests/compiler/graph-unittest.h" 5 #include "test/unittests/compiler/graph-unittest.h"
6 6
7 #include "src/compiler/node-properties-inl.h" 7 #include "src/compiler/node-properties-inl.h"
8 #include "test/unittests/compiler/node-test-utils.h" 8 #include "test/unittests/compiler/node-test-utils.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 TypedGraphTest::~TypedGraphTest() {} 99 TypedGraphTest::~TypedGraphTest() {}
100 100
101 101
102 Node* TypedGraphTest::Parameter(Type* type, int32_t index) { 102 Node* TypedGraphTest::Parameter(Type* type, int32_t index) {
103 Node* node = GraphTest::Parameter(index); 103 Node* node = GraphTest::Parameter(index);
104 NodeProperties::SetBounds(node, Bounds(type)); 104 NodeProperties::SetBounds(node, Bounds(type));
105 return node; 105 return node;
106 } 106 }
107 107
108
109 namespace {
110
111 const Operator kDummyOperator(0, Operator::kNoProperties, "Dummy", 0, 0, 0, 1,
112 0, 0);
113
114 } // namespace
115
116
117 TEST_F(GraphTest, NewNode) {
118 Node* n0 = graph()->NewNode(&kDummyOperator);
119 Node* n1 = graph()->NewNode(&kDummyOperator);
120 EXPECT_NE(n0, n1);
121 EXPECT_LT(0, n0->id());
122 EXPECT_LT(0, n1->id());
123 EXPECT_NE(n0->id(), n1->id());
124 EXPECT_EQ(&kDummyOperator, n0->op());
125 EXPECT_EQ(&kDummyOperator, n1->op());
126 }
127
108 } // namespace compiler 128 } // namespace compiler
109 } // namespace internal 129 } // namespace internal
110 } // namespace v8 130 } // namespace v8
OLDNEW
« 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