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

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

Issue 819103002: [turbofan] Minor cleanup to reduce code duplication. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/unittests/compiler/change-lowering-unittest.cc ('k') | test/unittests/compiler/graph-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.h
diff --git a/test/unittests/compiler/graph-unittest.h b/test/unittests/compiler/graph-unittest.h
index 32341e93654fea3b888058f0698cee06fea0b8b9..7c75161d9d2c092624fe3b247d5808476594f52c 100644
--- a/test/unittests/compiler/graph-unittest.h
+++ b/test/unittests/compiler/graph-unittest.h
@@ -7,7 +7,6 @@
#include "src/compiler/common-operator.h"
#include "src/compiler/graph.h"
-#include "src/compiler/machine-operator.h"
#include "src/compiler/typer.h"
#include "test/unittests/test-utils.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -29,11 +28,11 @@ using ::testing::Matcher;
class GraphTest : public TestWithContext, public TestWithZone {
public:
- explicit GraphTest(int parameters = 1);
+ explicit GraphTest(int num_parameters = 1);
~GraphTest() OVERRIDE;
protected:
- Node* Parameter(int32_t index);
+ Node* Parameter(int32_t index = 0);
Node* Float32Constant(volatile float value);
Node* Float64Constant(volatile double value);
Node* Int32Constant(int32_t value);
@@ -62,10 +61,13 @@ class GraphTest : public TestWithContext, public TestWithZone {
class TypedGraphTest : public GraphTest {
public:
- explicit TypedGraphTest(int parameters = 1)
- : GraphTest(parameters), typer_(graph(), MaybeHandle<Context>()) {}
+ explicit TypedGraphTest(int num_parameters = 1);
+ ~TypedGraphTest() OVERRIDE;
protected:
+ Node* Parameter(int32_t index = 0) { return GraphTest::Parameter(index); }
+ Node* Parameter(Type* type, int32_t index = 0);
+
Typer* typer() { return &typer_; }
private:
« no previous file with comments | « test/unittests/compiler/change-lowering-unittest.cc ('k') | test/unittests/compiler/graph-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698