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

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

Issue 480863002: Refactor ChangeLowering class to avoid template specialization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 years, 4 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/compiler-unittests/compiler-unittests.gyp ('k') | test/compiler-unittests/graph-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/compiler-unittests/graph-unittest.h
diff --git a/test/compiler-unittests/node-matchers.h b/test/compiler-unittests/graph-unittest.h
similarity index 80%
rename from test/compiler-unittests/node-matchers.h
rename to test/compiler-unittests/graph-unittest.h
index f51e3af5205526cb09fd4b4daa33ccb30a0cbba7..a41173828b9862869ee0d90ba049a540af853641 100644
--- a/test/compiler-unittests/node-matchers.h
+++ b/test/compiler-unittests/graph-unittest.h
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef V8_COMPILER_UNITTESTS_NODE_MATCHERS_H_
-#define V8_COMPILER_UNITTESTS_NODE_MATCHERS_H_
+#ifndef V8_COMPILER_UNITTESTS_GRAPH_UNITTEST_H_
+#define V8_COMPILER_UNITTESTS_GRAPH_UNITTEST_H_
+#include "src/compiler/graph.h"
#include "src/compiler/machine-operator.h"
+#include "test/compiler-unittests/common-operator-unittest.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace v8 {
@@ -18,13 +20,27 @@ class PrintableUnique;
namespace compiler {
-// Forward declarations.
-class Node;
+class GraphTest : public CommonOperatorTest {
+ public:
+ explicit GraphTest(int parameters = 1);
+ virtual ~GraphTest();
+
+ protected:
+ Graph* graph() { return &graph_; }
+
+ private:
+ Graph graph_;
+};
+
-using testing::Matcher;
+using ::testing::Matcher;
Matcher<Node*> IsBranch(const Matcher<Node*>& value_matcher,
const Matcher<Node*>& control_matcher);
+Matcher<Node*> IsMerge(const Matcher<Node*>& control0_matcher,
+ const Matcher<Node*>& control1_matcher);
+Matcher<Node*> IsIfTrue(const Matcher<Node*>& control_matcher);
+Matcher<Node*> IsIfFalse(const Matcher<Node*>& control_matcher);
Matcher<Node*> IsHeapConstant(
const Matcher<PrintableUnique<HeapObject> >& value_matcher);
Matcher<Node*> IsInt32Constant(const Matcher<int32_t>& value_matcher);
@@ -70,4 +86,4 @@ Matcher<Node*> IsChangeInt32ToFloat64(const Matcher<Node*>& input_matcher);
} // namespace internal
} // namespace v8
-#endif // V8_COMPILER_UNITTESTS_NODE_MATCHERS_H_
+#endif // V8_COMPILER_UNITTESTS_GRAPH_UNITTEST_H_
« no previous file with comments | « test/compiler-unittests/compiler-unittests.gyp ('k') | test/compiler-unittests/graph-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698