8#include <userver/engine/task/task_processor_fwd.hpp>
9#include <userver/formats/json/value.hpp>
10#include <userver/utils/function_ref.hpp>
12USERVER_NAMESPACE_BEGIN
25bool IsTestpointEnabled(std::string_view name)
noexcept;
27void ExecuteTestpointCoro(std::string_view name,
const formats::
json::Value& json, TestpointCallback callback);
29void ExecuteTestpointBlocking(
30 std::string_view name,
32 TestpointCallback callback,
33 engine::TaskProcessor& task_processor
36void DoNothing(
const formats::
json::Value&)
noexcept;
59#define TESTPOINT_CALLBACK(name, json, callback)
61 if (__builtin_expect(!USERVER_NAMESPACE
::testsuite::AreTestpointsAvailable(), true)) break;
64 const auto& userver_impl_tp_name = name;
65 if (!USERVER_NAMESPACE
::testsuite::impl::IsTestpointEnabled(userver_impl_tp_name)) break;
67 USERVER_NAMESPACE
::testsuite::impl::ExecuteTestpointCoro(userver_impl_tp_name, json, callback);
86#define TESTPOINT(name, json) TESTPOINT_CALLBACK(name, json, USERVER_NAMESPACE
::testsuite::impl::DoNothing)
96#define TESTPOINT_CALLBACK_NONCORO(name, json, task_processor, callback)
98 if (__builtin_expect(!USERVER_NAMESPACE
::testsuite::AreTestpointsAvailable(), true)) break;
101 const auto& userver_impl_tp_name = name;
102 if (!USERVER_NAMESPACE
::testsuite::impl::IsTestpointEnabled(userver_impl_tp_name)) break;
104 USERVER_NAMESPACE
::testsuite::impl::ExecuteTestpointBlocking(
105 userver_impl_tp_name, json, callback, task_processor
117#define TESTPOINT_NONCORO(name, json, task_processor)