1 /*
2  * Copyright (C) 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef SRC_BASE_TEST_GTEST_TEST_SUITE_H_
18 #define SRC_BASE_TEST_GTEST_TEST_SUITE_H_
19 
20 #include "gtest/gtest.h"
21 
22 // Define newer TEST_SUITE googletest APIs as aliases of the older APIs where
23 // necessary. This makes it possible to migrate Perfetto to the newer APIs and
24 // still use older googletest versions where necessary.
25 //
26 // TODO(costan): Remove this header after googletest is rolled in Android.
27 
28 #if !defined(INSTANTIATE_TEST_SUITE_P)
29 #define INSTANTIATE_TEST_SUITE_P(...) INSTANTIATE_TEST_CASE_P(__VA_ARGS__)
30 #endif
31 
32 #if !defined(INSTANTIATE_TYPED_TEST_SUITE_P)
33 #define INSTANTIATE_TYPED_TEST_SUITE_P(...) \
34   INSTANTIATE_TYPED_TEST_CASE_P(__VA_ARGS__)
35 #endif
36 
37 #if !defined(REGISTER_TEST_SUITE_P)
38 #define REGISTER_TEST_SUITE_P(...) REGISTER_TEST_CASE_P(__VA_ARGS__)
39 #endif
40 
41 #if !defined(TYPED_TEST_SUITE)
42 #define TYPED_TEST_SUITE(...) TYPED_TEST_CASE(__VA_ARGS__)
43 #endif
44 
45 #if !defined(TYPED_TEST_SUITE_P)
46 #define TYPED_TEST_SUITE_P(...) TYPED_TEST_CASE_P(__VA_ARGS__)
47 #endif
48 
49 #endif  // SRC_BASE_TEST_GTEST_TEST_SUITE_H_
50