Specs
Beautiful C++ Test Framework
Loading...
Searching...
No Matches
SpecsCpp::DSLs::Functions Namespace Reference

Functions

void describe (std::string_view description, std::function< void()> body)
 
void it (std::string_view description, std::function< void()> body)
 
void it (std::string_view description, std::function< void(SpecsCpp::SpecDone)> body)
 
void set_timeout (std::uint32_t timeoutMilliseconds)
 
void setup (std::function< void()> body)
 
void setup (std::function< void(SpecsCpp::SpecDone)> body)
 
void skip ()
 
void spec (std::string_view description, std::function< void()> body)
 
void spec (std::string_view description, std::function< void(SpecsCpp::SpecDone)> body)
 
void teardown (std::function< void()> body)
 
void teardown (std::function< void(SpecsCpp::SpecDone)> body)
 
void test (std::string_view description, std::function< void()> body)
 
void test (std::string_view description, std::function< void(SpecsCpp::SpecDone)> body)
 
void test (std::string_view description, std::function< void(SpecsCpp::ISpecGroup *)> body)
 
void test_template (std::string_view templateName, std::function< void()> body)
 
void use_template (std::string_view templateName)
 

Function Documentation

◆ describe()

void SpecsCpp::DSLs::Functions::describe ( std::string_view  description,
std::function< void()>  body 
)
inline

Definition at line 9 of file describe.h.

9 {
11 description, function_pointer(std::move(body))
12 );
13 }
void define_group_fn(std::string_view description, FunctionPointer< void()> body, bool removeUnderscores=false)

◆ it() [1/2]

void SpecsCpp::DSLs::Functions::it ( std::string_view  description,
std::function< void()>  body 
)
inline

Definition at line 11 of file it.h.

11 {
13 description, function_pointer(std::move(body))
14 );
15 }
void define_test_fn(std::string_view description, FunctionPointer< void()> body)

◆ it() [2/2]

void SpecsCpp::DSLs::Functions::it ( std::string_view  description,
std::function< void(SpecsCpp::SpecDone)>  body 
)
inline

Definition at line 17 of file it.h.

17 {
19 description, function_pointer(std::move(body))
20 );
21 }

◆ set_timeout()

void SpecsCpp::DSLs::Functions::set_timeout ( std::uint32_t  timeoutMilliseconds)
inline

Definition at line 9 of file set_timeout.h.

9 {
11 SpecDataValue::create("timeout", timeoutMilliseconds)
12 );
13 }
static GlobalSpecGroup & instance()
void add_meta_data_for_next_component(ISpecDataValue *value)

◆ setup() [1/2]

void SpecsCpp::DSLs::Functions::setup ( std::function< void()>  body)
inline

Definition at line 12 of file setup.h.

12 {
13 SpecsCpp::DSLs::GlobalInterface::define_setup_fn(function_pointer(std::move(body)));
14 }
void define_setup_fn(FunctionPointer< void()> body)

◆ setup() [2/2]

void SpecsCpp::DSLs::Functions::setup ( std::function< void(SpecsCpp::SpecDone)>  body)
inline

Definition at line 16 of file setup.h.

16 {
17 SpecsCpp::DSLs::GlobalInterface::define_setup_fn(function_pointer(std::move(body)));
18 }

◆ skip()

void SpecsCpp::DSLs::Functions::skip ( )
inline

Definition at line 9 of file skip.h.

9 {
11 SpecDataValue::create("skip", true)
12 );
13 }

◆ spec() [1/2]

void SpecsCpp::DSLs::Functions::spec ( std::string_view  description,
std::function< void()>  body 
)
inline

Definition at line 12 of file spec.h.

12 {
14 description, function_pointer(std::move(body))
15 );
16 }

◆ spec() [2/2]

void SpecsCpp::DSLs::Functions::spec ( std::string_view  description,
std::function< void(SpecsCpp::SpecDone)>  body 
)
inline

Definition at line 18 of file spec.h.

18 {
20 description, function_pointer(std::move(body))
21 );
22 }

◆ teardown() [1/2]

void SpecsCpp::DSLs::Functions::teardown ( std::function< void()>  body)
inline

Definition at line 12 of file teardown.h.

12 {
13 SpecsCpp::DSLs::GlobalInterface::define_teardown_fn(function_pointer(std::move(body)));
14 }
void define_teardown_fn(FunctionPointer< void()> body)

◆ teardown() [2/2]

void SpecsCpp::DSLs::Functions::teardown ( std::function< void(SpecsCpp::SpecDone)>  body)
inline

Definition at line 16 of file teardown.h.

16 {
17 SpecsCpp::DSLs::GlobalInterface::define_teardown_fn(function_pointer(std::move(body)));
18 }

◆ test() [1/3]

void SpecsCpp::DSLs::Functions::test ( std::string_view  description,
std::function< void()>  body 
)
inline

Definition at line 12 of file test.h.

12 {
14 description, function_pointer(std::move(body))
15 );
16 }

◆ test() [2/3]

void SpecsCpp::DSLs::Functions::test ( std::string_view  description,
std::function< void(SpecsCpp::ISpecGroup *)>  body 
)
inline

Definition at line 24 of file test.h.

26 {
28 description, function_pointer(std::move(body))
29 );
30 }

◆ test() [3/3]

void SpecsCpp::DSLs::Functions::test ( std::string_view  description,
std::function< void(SpecsCpp::SpecDone)>  body 
)
inline

Definition at line 18 of file test.h.

18 {
20 description, function_pointer(std::move(body))
21 );
22 }

◆ test_template()

void SpecsCpp::DSLs::Functions::test_template ( std::string_view  templateName,
std::function< void()>  body 
)
inline

Definition at line 11 of file test_template.h.

11 {
13 templateName, function_pointer(std::move(body))
14 );
15 }
void define_template_fn(std::string_view templateName, FunctionPointer< void()> body)

◆ use_template()

void SpecsCpp::DSLs::Functions::use_template ( std::string_view  templateName)
inline

Definition at line 7 of file use_template.h.

7 {
9 }
void use_template(std::string_view templateName)