| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_UNITTESTS_COMPILER_COMPILER_TEST_UTILS_H_ | 5 #ifndef V8_UNITTESTS_COMPILER_COMPILER_TEST_UTILS_H_ |
| 6 #define V8_UNITTESTS_COMPILER_COMPILER_TEST_UTILS_H_ | 6 #define V8_UNITTESTS_COMPILER_COMPILER_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| 11 namespace internal { | 11 namespace internal { |
| 12 namespace compiler { | 12 namespace compiler { |
| 13 | 13 |
| 14 // The TARGET_TEST(Case, Name) macro works just like | 14 // The TARGET_TEST(Case, Name) macro works just like |
| 15 // TEST(Case, Name), except that the test is disabled | 15 // TEST(Case, Name), except that the test is disabled |
| 16 // if the platform is not a supported TurboFan target. | 16 // if the platform is not a supported TurboFan target. |
| 17 #if V8_TURBOFAN_TARGET | |
| 18 #define TARGET_TEST(Case, Name) TEST(Case, Name) | 17 #define TARGET_TEST(Case, Name) TEST(Case, Name) |
| 19 #else | |
| 20 #define TARGET_TEST(Case, Name) TEST(Case, DISABLED_##Name) | |
| 21 #endif | |
| 22 | 18 |
| 23 | 19 |
| 24 // The TARGET_TEST_F(Case, Name) macro works just like | 20 // The TARGET_TEST_F(Case, Name) macro works just like |
| 25 // TEST_F(Case, Name), except that the test is disabled | 21 // TEST_F(Case, Name), except that the test is disabled |
| 26 // if the platform is not a supported TurboFan target. | 22 // if the platform is not a supported TurboFan target. |
| 27 #if V8_TURBOFAN_TARGET | |
| 28 #define TARGET_TEST_F(Case, Name) TEST_F(Case, Name) | 23 #define TARGET_TEST_F(Case, Name) TEST_F(Case, Name) |
| 29 #else | |
| 30 #define TARGET_TEST_F(Case, Name) TEST_F(Case, DISABLED_##Name) | |
| 31 #endif | |
| 32 | 24 |
| 33 | 25 |
| 34 // The TARGET_TEST_P(Case, Name) macro works just like | 26 // The TARGET_TEST_P(Case, Name) macro works just like |
| 35 // TEST_P(Case, Name), except that the test is disabled | 27 // TEST_P(Case, Name), except that the test is disabled |
| 36 // if the platform is not a supported TurboFan target. | 28 // if the platform is not a supported TurboFan target. |
| 37 #if V8_TURBOFAN_TARGET | |
| 38 #define TARGET_TEST_P(Case, Name) TEST_P(Case, Name) | 29 #define TARGET_TEST_P(Case, Name) TEST_P(Case, Name) |
| 39 #else | |
| 40 #define TARGET_TEST_P(Case, Name) TEST_P(Case, DISABLED_##Name) | |
| 41 #endif | |
| 42 | 30 |
| 43 | 31 |
| 44 // The TARGET_TYPED_TEST(Case, Name) macro works just like | 32 // The TARGET_TYPED_TEST(Case, Name) macro works just like |
| 45 // TYPED_TEST(Case, Name), except that the test is disabled | 33 // TYPED_TEST(Case, Name), except that the test is disabled |
| 46 // if the platform is not a supported TurboFan target. | 34 // if the platform is not a supported TurboFan target. |
| 47 #if V8_TURBOFAN_TARGET | |
| 48 #define TARGET_TYPED_TEST(Case, Name) TYPED_TEST(Case, Name) | 35 #define TARGET_TYPED_TEST(Case, Name) TYPED_TEST(Case, Name) |
| 49 #else | |
| 50 #define TARGET_TYPED_TEST(Case, Name) TYPED_TEST(Case, DISABLED_##Name) | |
| 51 #endif | |
| 52 | 36 |
| 53 } // namespace compiler | 37 } // namespace compiler |
| 54 } // namespace internal | 38 } // namespace internal |
| 55 } // namespace v8 | 39 } // namespace v8 |
| 56 | 40 |
| 57 #endif // V8_UNITTESTS_COMPILER_COMPILER_TEST_UTILS_H_ | 41 #endif // V8_UNITTESTS_COMPILER_COMPILER_TEST_UTILS_H_ |
| OLD | NEW |