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

Unified Diff: src/compiler/machine-operator-unittest.cc

Issue 540823002: Refactor common unit test code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes Created 6 years, 3 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 | « src/compiler/machine-operator-reducer-unittest.cc ('k') | src/test/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/machine-operator-unittest.cc
diff --git a/src/compiler/machine-operator-unittest.cc b/src/compiler/machine-operator-unittest.cc
index e7b9337cf4cc5f9ed00b5efbdb177e9aff32f6e8..5f46be1e000c83e0176eb090425cf4ba4e128443 100644
--- a/src/compiler/machine-operator-unittest.cc
+++ b/src/compiler/machine-operator-unittest.cc
@@ -2,31 +2,32 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "src/compiler/compiler-unittests.h"
#include "src/compiler/machine-operator.h"
#include "src/compiler/operator-properties-inl.h"
-#include "testing/gmock/include/gmock/gmock.h"
-
-using testing::IsNull;
+#include "src/test/test-utils.h"
namespace v8 {
namespace internal {
namespace compiler {
-class MachineOperatorCommonTest : public CompilerTestWithParam<MachineType> {
+class MachineOperatorCommonTest
+ : public TestWithZone,
+ public ::testing::WithParamInterface<MachineType> {
public:
MachineOperatorCommonTest() : machine_(NULL) {}
- virtual ~MachineOperatorCommonTest() { EXPECT_THAT(machine_, IsNull()); }
+ virtual ~MachineOperatorCommonTest() { EXPECT_EQ(NULL, machine_); }
virtual void SetUp() OVERRIDE {
- CompilerTestWithParam<MachineType>::SetUp();
+ TestWithZone::SetUp();
+ EXPECT_EQ(NULL, machine_);
machine_ = new MachineOperatorBuilder(zone(), GetParam());
}
virtual void TearDown() OVERRIDE {
+ ASSERT_TRUE(machine_ != NULL);
delete machine_;
machine_ = NULL;
- CompilerTestWithParam<MachineType>::TearDown();
+ TestWithZone::TearDown();
}
protected:
« no previous file with comments | « src/compiler/machine-operator-reducer-unittest.cc ('k') | src/test/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698