Specs
Beautiful C++ Test Framework
Loading...
Searching...
No Matches
ASYNC_TEST.h
Go to the documentation of this file.
1#pragma once
2
4#include <Specs/SpecDone.h>
5
6#include "MacrosCore.h" // IWYU pragma: keep
7
8#define __SPEC_ASYNC_TEST_BODY(symbol, specDescription, count) \
9 inline void _GLOBAL_MACRO_FUNCTIONS_NEW_NAMED_FUNCTION_NAME_FROM_COUNT(symbol, count)( \
10 SpecsCpp::ISpecGroup*, SpecsCpp::ISpec*, SpecsCpp::SpecDone \
11 ); \
12 _GLOBAL_MACRO_FUNCTIONS_NEW_NAMED_FUNCTION_RUNNER_VARIABLE_NAME_FROM_COUNT(symbol, count){[]( \
13 ) { \
14 SpecsCpp::DSLs::GlobalInterface::define_test_fn( \
15 specDescription, \
16 _GLOBAL_MACRO_FUNCTIONS_NEW_NAMED_FUNCTION_NAME_FROM_COUNT(symbol, count) \
17 ); \
18 }}; \
19 inline void _GLOBAL_MACRO_FUNCTIONS_NEW_NAMED_FUNCTION_NAME_FROM_COUNT(symbol, count)( \
20 [[maybe_unused]] SpecsCpp::ISpecGroup * current_group, \
21 [[maybe_unused]] SpecsCpp::ISpec * current_test, SpecsCpp::SpecDone done \
22 )
23
24#define _SPEC_ASYNC_TEST(specDescription) \
25 __SPEC_ASYNC_TEST_BODY(_SPEC_ASYNC_TEST_, specDescription, __COUNTER__)