OLD | NEW |
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 #ifndef V8_COMPILER_GRAPH_UNITTEST_H_ | 5 #ifndef V8_COMPILER_GRAPH_UNITTEST_H_ |
6 #define V8_COMPILER_GRAPH_UNITTEST_H_ | 6 #define V8_COMPILER_GRAPH_UNITTEST_H_ |
7 | 7 |
8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
9 #include "src/compiler/compiler-unittests.h" | |
10 #include "src/compiler/graph.h" | 9 #include "src/compiler/graph.h" |
11 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| 11 #include "src/test/test-utils.h" |
12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
13 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 | 16 |
17 // Forward declarations. | 17 // Forward declarations. |
18 class HeapObject; | 18 class HeapObject; |
19 template <class T> | 19 template <class T> |
20 class PrintableUnique; | 20 class PrintableUnique; |
21 | 21 |
22 namespace compiler { | 22 namespace compiler { |
23 | 23 |
24 using ::testing::Matcher; | 24 using ::testing::Matcher; |
25 | 25 |
26 | 26 |
27 class GraphTest : public CompilerTest { | 27 class GraphTest : public TestWithContext, public TestWithZone { |
28 public: | 28 public: |
29 explicit GraphTest(int parameters = 1); | 29 explicit GraphTest(int parameters = 1); |
30 virtual ~GraphTest(); | 30 virtual ~GraphTest(); |
31 | 31 |
32 protected: | 32 protected: |
33 Node* Parameter(int32_t index); | 33 Node* Parameter(int32_t index); |
34 Node* Float64Constant(double value); | 34 Node* Float64Constant(double value); |
35 Node* Int32Constant(int32_t value); | 35 Node* Int32Constant(int32_t value); |
36 Node* Int64Constant(int64_t value); | 36 Node* Int64Constant(int64_t value); |
37 Node* NumberConstant(double value); | 37 Node* NumberConstant(double value); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 Matcher<Node*> IsChangeUint32ToFloat64(const Matcher<Node*>& input_matcher); | 122 Matcher<Node*> IsChangeUint32ToFloat64(const Matcher<Node*>& input_matcher); |
123 Matcher<Node*> IsChangeUint32ToUint64(const Matcher<Node*>& input_matcher); | 123 Matcher<Node*> IsChangeUint32ToUint64(const Matcher<Node*>& input_matcher); |
124 Matcher<Node*> IsTruncateFloat64ToInt32(const Matcher<Node*>& input_matcher); | 124 Matcher<Node*> IsTruncateFloat64ToInt32(const Matcher<Node*>& input_matcher); |
125 Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher); | 125 Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher); |
126 | 126 |
127 } // namespace compiler | 127 } // namespace compiler |
128 } // namespace internal | 128 } // namespace internal |
129 } // namespace v8 | 129 } // namespace v8 |
130 | 130 |
131 #endif // V8_COMPILER_GRAPH_UNITTEST_H_ | 131 #endif // V8_COMPILER_GRAPH_UNITTEST_H_ |
OLD | NEW |