xref: /aosp_15_r20/external/ruy/ruy/gtest_wrapper.h (revision bb86c7ed5fb1b98a7eac808e443a46cc8b90dfc0)
1 /* Copyright 2020 Google LLC. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7     http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 
16 // Wrapper around GTest that works around warnings and inconsistencies.
17 
18 #ifndef THIRD_PARTY_RUY_RUY_GTEST_WRAPPER_H_
19 #define THIRD_PARTY_RUY_RUY_GTEST_WRAPPER_H_
20 
21 #pragma GCC diagnostic push
22 #pragma GCC diagnostic ignored "-Wunused-parameter"
23 #include "gtest/gtest.h"  // IWYU pragma: export
24 #pragma GCC diagnostic pop
25 
26 // When building for WAsm, ASSERT_DEATH is not defined.
27 #ifdef ASSERT_DEATH
28 #define RUY_ASSERT_DEATH(CONDITION, MESSAGE) ASSERT_DEATH(CONDITION, MESSAGE)
29 #else
30 #define RUY_ASSERT_DEATH(CONDITION, MESSAGE)
31 #endif
32 
33 #endif  // THIRD_PARTY_RUY_RUY_GTEST_WRAPPER_H_
34