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

Unified Diff: test/unittests/compiler/compiler.h

Issue 439863004: Initial import of unittests using GTest/GMock. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix invalid EXPECT_EQ 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
Index: test/unittests/compiler/compiler.h
diff --git a/test/unittests/compiler/compiler.h b/test/unittests/compiler/compiler.h
new file mode 100644
index 0000000000000000000000000000000000000000..864794dbf14eb4e84b7dbe8872d56407dbf99cc5
--- /dev/null
+++ b/test/unittests/compiler/compiler.h
@@ -0,0 +1,30 @@
+// 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_UNITTESTS_COMPILER_COMPILER_H_
+#define V8_UNITTESTS_COMPILER_COMPILER_H_
+
+#include "src/compiler/pipeline.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+// The COMPILER_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 COMPILER_TEST(Case, Name) TEST(Case, Name)
+#else // V8_TURBOFAN_TARGET
+#define COMPILER_TEST(Case, Name) TEST(Case, DISABLED_##Name)
+#endif // V8_TURBOFAN_TARGET
+
+
+// The COMPILER_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 COMPILER_TEST_F(Case, Name) TEST_F(Case, Name)
+#else // V8_TURBOFAN_TARGET
+#define COMPILER_TEST_F(Case, Name) TEST_F(Case, DISABLED_##Name)
+#endif // V8_TURBOFAN_TARGET
+
+#endif // V8_UNITTESTS_COMPILER_COMPILER_H_

Powered by Google App Engine
This is Rietveld 408576698