10#include <gtest/gtest.h>
12#include <userver/engine/run_in_coro.hpp>
13#include <userver/utest/assert_macros.hpp>
14#include <userver/utest/test_case_macros.hpp>
15#include <userver/utils/assert.hpp>
16#include <userver/utils/strong_typedef.hpp>
21void PrintTo(std::chrono::seconds s, std::ostream* os);
22void PrintTo(std::chrono::milliseconds ms, std::ostream* os);
23void PrintTo(std::chrono::microseconds us, std::ostream* os);
24void PrintTo(std::chrono::nanoseconds ns, std::ostream* os);
28USERVER_NAMESPACE_BEGIN
39namespace formats::
json {
43void PrintTo(
const Value&, std::ostream*);
49template <
class Tag,
class T, StrongTypedefOps Ops>
50void PrintTo(
const StrongTypedef<Tag, T, Ops>& v, std::ostream* os) {
51 ::testing::internal::UniversalTersePrint(v.GetUnderlying(), os);
58template <
int Prec,
typename RoundPolicy>
61template <
int Prec,
typename RoundPolicy>
62void PrintTo(
const Decimal<Prec, RoundPolicy>& v, std::ostream* os) {
72#define DISABLED_IN_DEBUG_TEST_NAME(name) DISABLED_##name
75#define DISABLED_IN_DEBUG_TEST_NAME(name) name
80#define DISABLED_IN_MAC_OS_TEST_NAME(name) DISABLED_##name
83#define DISABLED_IN_MAC_OS_TEST_NAME(name) name
88#define DISABLED_IN_LIBCPP_TEST_NAME(name) DISABLED_##name
91#define DISABLED_IN_LIBCPP_TEST_NAME(name) name
119#define UTEST(test_suite_name, test_name) IMPL_UTEST_TEST(test_suite_name, test_name, 1
, false)
125#define UTEST_DEATH(test_suite_name, test_name) IMPL_UTEST_TEST(test_suite_name, test_name, 1
, true)
132#define UTEST_MT(test_suite_name, test_name, thread_count)
139#define UTEST_F(test_suite_name, test_name) IMPL_UTEST_TEST_F(test_suite_name, test_name, 1
, false)
145#define UTEST_F_DEATH(test_suite_name, test_name) IMPL_UTEST_TEST_F(test_suite_name, test_name, 1
, true)
152#define UTEST_F_MT(test_suite_name, test_name, thread_count)
159#define UTEST_P(test_suite_name, test_name) IMPL_UTEST_TEST_P(test_suite_name, test_name, 1
, false)
165#define UTEST_P_MT(test_suite_name, test_name, thread_count)
179#define TYPED_UTEST_MT(test_suite_name, test_name, thread_count)
193#define TYPED_UTEST_P_MT(test_suite_name, test_name, thread_count)
200#define TYPED_UTEST_SUITE(test_suite_name, types)
204 TYPED_TEST_SUITE
(test_suite_name, types, USERVER_NAMESPACE
::utest::impl::DefaultNameGenerator);
206 struct UtestImplForceSemicolon
212#define INSTANTIATE_UTEST_SUITE_P(prefix, test_suite_name, ...)
217 USERVER_NAMESPACE
::utest::impl::TestLauncherParametric
219 INSTANTIATE_TEST_SUITE_P
(prefix, test_suite_name, __VA_ARGS__);
221 struct UtestImplForceSemicolon
227#define REGISTER_TYPED_UTEST_SUITE_P(test_suite_name, ...)
229 REGISTER_TYPED_TEST_SUITE_P
(test_suite_name, __VA_ARGS__);
231 struct UtestImplForceSemicolon
237#define INSTANTIATE_TYPED_UTEST_SUITE_P(prefix, test_suite_name, types)
239 INSTANTIATE_TYPED_TEST_SUITE_P
(
243 USERVER_NAMESPACE
::utest::impl::DefaultNameGenerator
246 struct UtestImplForceSemicolon
252#define TYPED_UTEST_SUITE_P(test_suite_name)
256 TYPED_TEST_SUITE_P
(test_suite_name);
258 struct UtestImplForceSemicolon