| danzh | c3be2d4 | 2019-04-25 07:47:41 -0700 | [diff] [blame] | 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 | |
| vasilvv | ddf8227 | 2023-10-16 23:08:22 -0700 | [diff] [blame] | 8 | #include "quiche_platform_impl/quiche_test_impl.h" // IWYU pragma: export |
| danzh | c3be2d4 | 2019-04-25 07:47:41 -0700 | [diff] [blame] | 9 | |
| bnc | 7ddea9b | 2022-05-18 08:36:18 -0700 | [diff] [blame] | 10 | namespace quiche::test { |
| 11 | |
| 12 | using QuicheTest = QuicheTestImpl; |
| QUICHE team | f3c80c9 | 2020-02-12 09:47:55 -0800 | [diff] [blame] | 13 | |
| dmcardle | 8f7df53 | 2020-01-07 13:28:57 -0800 | [diff] [blame] | 14 | template <class T> |
| bnc | 7ddea9b | 2022-05-18 08:36:18 -0700 | [diff] [blame] | 15 | using QuicheTestWithParam = QuicheTestWithParamImpl<T>; |
| dmcardle | 8f7df53 | 2020-01-07 13:28:57 -0800 | [diff] [blame] | 16 | |
| bnc | c697d46 | 2022-03-08 08:59:39 -0800 | [diff] [blame] | 17 | using QuicheFlagSaver = QuicheFlagSaverImpl; |
| 18 | |
| danzh | e6476d9 | 2024-01-19 08:16:40 -0800 | [diff] [blame] | 19 | using QuicheScopedDisableExitOnDFatal = QuicheScopedDisableExitOnDFatalImpl; |
| 20 | |
| bnc | c697d46 | 2022-03-08 08:59:39 -0800 | [diff] [blame] | 21 | // Class which needs to be instantiated in tests which use threads. |
| 22 | using ScopedEnvironmentForThreads = ScopedEnvironmentForThreadsImpl; |
| 23 | |
| 24 | inline std::string QuicheGetTestMemoryCachePath() { |
| 25 | return QuicheGetTestMemoryCachePathImpl(); |
| 26 | } |
| 27 | |
| vasilvv | 90615e3 | 2021-07-02 08:12:43 -0700 | [diff] [blame] | 28 | // Returns the path to quiche/common directory where the test data could be |
| 29 | // located. |
| 30 | inline std::string QuicheGetCommonSourcePath() { |
| 31 | return QuicheGetCommonSourcePathImpl(); |
| 32 | } |
| 33 | |
| bnc | 7ddea9b | 2022-05-18 08:36:18 -0700 | [diff] [blame] | 34 | } // namespace quiche::test |
| vasilvv | 90615e3 | 2021-07-02 08:12:43 -0700 | [diff] [blame] | 35 | |
| bnc | 08fc2ae | 2021-04-27 14:57:51 -0700 | [diff] [blame] | 36 | #define EXPECT_QUICHE_DEBUG_DEATH(condition, message) \ |
| 37 | EXPECT_QUICHE_DEBUG_DEATH_IMPL(condition, message) |
| 38 | |
| awillia | 6fed964 | 2024-02-26 14:45:31 -0800 | [diff] [blame] | 39 | #define EXPECT_QUICHE_DEATH(condition, message) \ |
| 40 | EXPECT_QUICHE_DEATH_IMPL(condition, message) |
| 41 | |
| bnc | c697d46 | 2022-03-08 08:59:39 -0800 | [diff] [blame] | 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 | |
| danzh | c3be2d4 | 2019-04-25 07:47:41 -0700 | [diff] [blame] | 47 | #endif // QUICHE_COMMON_PLATFORM_API_QUICHE_TEST_H_ |