xtd 0.2.0
Loading...
Searching...
No Matches

◆ tunit_main_

#define tunit_main_

#include <xtd.tunit/include/xtd/tunit/tunit_main.h>

Defines the entry point to be called with startup_ for unit test application.

Library
xtd.tunit
Remarks
The tunit_main_ contains a main method and launch xtd::tunit::console_unit_test::run.
Examples
The followng code shows ho to use tunit_main_.
#include <xtd/xtd.tunit>
using namespace xtd::tunit;
namespace unit_tests {
test_class_(class_to_test) {
public:
void test_method_(test1) {
// Do test...
}
};
}
startup_(tunit_main_::main);
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.h:175
#define test_class_(class_name)
Helper to create a test_class in a test unit.
Definition test_class_attribute.h:43
#define test_method_(method_name)
Add test method to class test.
Definition test_method_attribute.h:89
The tunit namespace contains a unit test library.
Definition abort_error.h:10