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