xref: /aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/common/platform/api/quiche_test.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright (c) 2019 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef QUICHE_COMMON_PLATFORM_API_QUICHE_TEST_H_
6 #define QUICHE_COMMON_PLATFORM_API_QUICHE_TEST_H_
7 
8 #include "quiche_platform_impl/quiche_test_impl.h"  // IWYU pragma: export
9 
10 namespace quiche::test {
11 
12 using QuicheTest = QuicheTestImpl;
13 
14 template <class T>
15 using QuicheTestWithParam = QuicheTestWithParamImpl<T>;
16 
17 using QuicheFlagSaver = QuicheFlagSaverImpl;
18 
19 using QuicheScopedDisableExitOnDFatal = QuicheScopedDisableExitOnDFatalImpl;
20 
21 // Class which needs to be instantiated in tests which use threads.
22 using ScopedEnvironmentForThreads = ScopedEnvironmentForThreadsImpl;
23 
QuicheGetTestMemoryCachePath()24 inline std::string QuicheGetTestMemoryCachePath() {
25   return QuicheGetTestMemoryCachePathImpl();
26 }
27 
28 // Returns the path to quiche/common directory where the test data could be
29 // located.
QuicheGetCommonSourcePath()30 inline std::string QuicheGetCommonSourcePath() {
31   return QuicheGetCommonSourcePathImpl();
32 }
33 
34 }  // namespace quiche::test
35 
36 #define EXPECT_QUICHE_DEBUG_DEATH(condition, message) \
37   EXPECT_QUICHE_DEBUG_DEATH_IMPL(condition, message)
38 
39 #define EXPECT_QUICHE_DEATH(condition, message) \
40   EXPECT_QUICHE_DEATH_IMPL(condition, message)
41 
42 #define QUICHE_TEST_DISABLED_IN_CHROME(name) \
43   QUICHE_TEST_DISABLED_IN_CHROME_IMPL(name)
44 
45 #define QUICHE_SLOW_TEST(test) QUICHE_SLOW_TEST_IMPL(test)
46 
47 #endif  // QUICHE_COMMON_PLATFORM_API_QUICHE_TEST_H_
48