Unit Test Framework Modern C++ API Reference
Test definitions

Implements Unit Test Framework Modern C++ API. See the user's manual for examples of how to use most of these APIs. More...

Data Structures

class  rti::test::TesterContainer
 A container of Testers. This is the top level tester, so tester classes should inherits from this class. More...
 

Macros

#define RTI_TEST_FUNCTION_ADD(class_name__, test_function__)
 This macro generates and registers a function that the C test framework can run. This macro must be called in a Tester constructor. More...
 

Detailed Description

Implements Unit Test Framework Modern C++ API. See the user's manual for examples of how to use most of these APIs.

Macro Definition Documentation

◆ RTI_TEST_FUNCTION_ADD

#define RTI_TEST_FUNCTION_ADD (   class_name__,
  test_function__ 
)
Value:
struct runner_##test_function__ { \
static int run(const struct RTITestSetting *setting) \
{ \
return run_test_function( \
setting, \
class_name__::get_instance().get_name() + "::" #test_function__, \
class_name__::get_instance(), \
std::mem_fn(&class_name__::test_function__)); \
} \
}; \
\
add_test_function((RTITestFunction) runner_##test_function__::run)

This macro generates and registers a function that the C test framework can run. This macro must be called in a Tester constructor.