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

Unified Diff: src/compiler/compiler-unittests.h

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/compiler-test-utils.h ('k') | src/compiler/compiler-unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/compiler-unittests.h
diff --git a/src/compiler/compiler-unittests.h b/src/compiler/compiler-unittests.h
deleted file mode 100644
index dd4234b9613027b863f9413f1d57318ae031c370..0000000000000000000000000000000000000000
--- a/src/compiler/compiler-unittests.h
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef V8_COMPILER_UNITTESTS_COMPILER_UNITTESTS_H_
-#define V8_COMPILER_UNITTESTS_COMPILER_UNITTESTS_H_
-
-#include "include/v8.h"
-#include "src/zone.h"
-#include "testing/gtest-support.h"
-
-namespace v8 {
-namespace internal {
-
-// Forward declarations.
-class Factory;
-
-
-namespace compiler {
-
-// The TARGET_TEST(Case, Name) macro works just like
-// TEST(Case, Name), except that the test is disabled
-// if the platform is not a supported TurboFan target.
-#if V8_TURBOFAN_TARGET
-#define TARGET_TEST(Case, Name) TEST(Case, Name)
-#else
-#define TARGET_TEST(Case, Name) TEST(Case, DISABLED_##Name)
-#endif
-
-
-// The TARGET_TEST_F(Case, Name) macro works just like
-// TEST_F(Case, Name), except that the test is disabled
-// if the platform is not a supported TurboFan target.
-#if V8_TURBOFAN_TARGET
-#define TARGET_TEST_F(Case, Name) TEST_F(Case, Name)
-#else
-#define TARGET_TEST_F(Case, Name) TEST_F(Case, DISABLED_##Name)
-#endif
-
-
-// The TARGET_TEST_P(Case, Name) macro works just like
-// TEST_P(Case, Name), except that the test is disabled
-// if the platform is not a supported TurboFan target.
-#if V8_TURBOFAN_TARGET
-#define TARGET_TEST_P(Case, Name) TEST_P(Case, Name)
-#else
-#define TARGET_TEST_P(Case, Name) TEST_P(Case, DISABLED_##Name)
-#endif
-
-
-// The TARGET_TYPED_TEST(Case, Name) macro works just like
-// TYPED_TEST(Case, Name), except that the test is disabled
-// if the platform is not a supported TurboFan target.
-#if V8_TURBOFAN_TARGET
-#define TARGET_TYPED_TEST(Case, Name) TYPED_TEST(Case, Name)
-#else
-#define TARGET_TYPED_TEST(Case, Name) TYPED_TEST(Case, DISABLED_##Name)
-#endif
-
-
-class CompilerTest : public ::testing::Test {
- public:
- CompilerTest();
- virtual ~CompilerTest();
-
- Factory* factory() const;
- Isolate* isolate() const { return reinterpret_cast<Isolate*>(isolate_); }
- Zone* zone() { return &zone_; }
-
- static void SetUpTestCase();
- static void TearDownTestCase();
-
- private:
- static v8::Isolate* isolate_;
- v8::Isolate::Scope isolate_scope_;
- v8::HandleScope handle_scope_;
- v8::Context::Scope context_scope_;
- Zone zone_;
-};
-
-
-template <typename T>
-class CompilerTestWithParam : public CompilerTest,
- public ::testing::WithParamInterface<T> {};
-
-} // namespace compiler
-} // namespace internal
-} // namespace v8
-
-#endif // V8_COMPILER_UNITTESTS_COMPILER_UNITTESTS_H_
« no previous file with comments | « src/compiler/compiler-test-utils.h ('k') | src/compiler/compiler-unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698