| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license | |
| 5 * that can be found in the LICENSE file in the root of the source | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 #ifndef TEST_TESTSUPPORT_INCLUDE_GTEST_DISABLE_H_ | |
| 11 #define TEST_TESTSUPPORT_INCLUDE_GTEST_DISABLE_H_ | |
| 12 | |
| 13 // Helper macros for platform disables. These can be chained. Example use: | |
| 14 // TEST_F(ViEStandardIntegrationTest, | |
| 15 // DISABLED_ON_LINUX(RunsBaseTestWithoutErrors)) { // ... | |
| 16 // | |
| 17 // Or, you can disable a whole test class by wrapping all mentions of the test | |
| 18 // class name inside one of these macros. | |
| 19 // | |
| 20 // The platform #defines we are looking at here are set by the build system. | |
| 21 #ifdef WEBRTC_LINUX | |
| 22 #define DISABLED_ON_LINUX(test) DISABLED_##test | |
| 23 #else | |
| 24 #define DISABLED_ON_LINUX(test) test | |
| 25 #endif | |
| 26 | |
| 27 #ifdef WEBRTC_MAC | |
| 28 #define DISABLED_ON_MAC(test) DISABLED_##test | |
| 29 #else | |
| 30 #define DISABLED_ON_MAC(test) test | |
| 31 #endif | |
| 32 | |
| 33 #ifdef _WIN32 | |
| 34 #define DISABLED_ON_WIN(test) DISABLED_##test | |
| 35 #else | |
| 36 #define DISABLED_ON_WIN(test) test | |
| 37 #endif | |
| 38 | |
| 39 // Using some extra magic here to be able to chain Android and iOS macros. | |
| 40 // http://stackoverflow.com/questions/8231966/why-do-i-need-double-layer-of-indi
rection-for-macros | |
| 41 #ifdef WEBRTC_ANDROID | |
| 42 #define DISABLED_ON_ANDROID_HIDDEN(test) DISABLED_##test | |
| 43 #define DISABLED_ON_ANDROID(test) DISABLED_ON_ANDROID_HIDDEN(test) | |
| 44 #else | |
| 45 #define DISABLED_ON_ANDROID_HIDDEN(test) test | |
| 46 #define DISABLED_ON_ANDROID(test) DISABLED_ON_ANDROID_HIDDEN(test) | |
| 47 #endif | |
| 48 | |
| 49 #ifdef WEBRTC_IOS | |
| 50 #define DISABLED_ON_IOS_HIDDEN(test) DISABLED_##test | |
| 51 #define DISABLED_ON_IOS(test) DISABLED_ON_IOS_HIDDEN(test) | |
| 52 #else | |
| 53 #define DISABLED_ON_IOS_HIDDEN(test) test | |
| 54 #define DISABLED_ON_IOS(test) DISABLED_ON_IOS_HIDDEN(test) | |
| 55 #endif | |
| 56 | |
| 57 #endif // TEST_TESTSUPPORT_INCLUDE_GTEST_DISABLE_H_ | |
| OLD | NEW |