• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifdef WEBRTC_ANDROID
40 #define DISABLED_ON_ANDROID(test) DISABLED_##test
41 #else
42 #define DISABLED_ON_ANDROID(test) test
43 #endif
44 
45 #endif  // TEST_TESTSUPPORT_INCLUDE_GTEST_DISABLE_H_
46