xtd - Reference Guide 0.2.0
unit tests

Definition

Unit tests definitions.

Collaboration diagram for unit tests:

Modules

 assertions
 Assertions definitions.
 
 assumptions
 Assumptions definitions.
 
 validations
 validations definitions
 

Classes

class  xtd::tunit::base_assert
 The base class for assert. More...
 
class  xtd::tunit::class_cleanup_attribute
 This attribute is use to add cleanup class method to class test attribute. More...
 
class  xtd::tunit::class_event_args
 Provides data for the xtd::tunit::class_test events. More...
 
class  xtd::tunit::class_initialize_attribute
 This attribute is use to add initialize class method to class test attribute. More...
 
class  xtd::tunit::console_unit_test
 The console_unit_test class is console unit test interface. More...
 
class  xtd::tunit::event_listener
 Represent the event listener class. Unit test call theses events when unit tests are processing. More...
 
class  xtd::tunit::ostream_event_listener
 The ostream_unit_test class is a specialisation of event_listener class for writing events in std::ostream. More...
 
class  xtd::tunit::ostream_unit_test
 The ostream_unit_test class is ostream unit test interface. More...
 
class  xtd::tunit::registered_test_class
 Represents the registered test class. More...
 
class  xtd::tunit::settings
 The settings class contains xtd.tunit settings. More...
 
class  xtd::tunit::test_event_args
 Provides data for the xtd::tunit::test events. More...
 
class  xtd::tunit::tunit_event_args
 tunit_event_args is the base class for classes containing event data. More...
 
class  xtd::tunit::unit_test
 The template class. More...
 

Macros

#define class_cleanup_(method_name)
 Add cleanup class method to class test. More...
 

Enumerations

enum  xtd::tunit::test_state {
  xtd::tunit::test_state::considered,
  xtd::tunit::test_state::ignored
}
 Represent the test state enumeration used bu test. More...
 

Macro Definition Documentation

◆ class_cleanup_

#define class_cleanup_ (   method_name)

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

Value:
__##method_name##_static() {} \
class __class_cleanup_attribute : public xtd::tunit::class_cleanup_attribute { \
public:\
template<typename test_class> __class_cleanup_attribute(test_class& test) : class_cleanup_attribute(#method_name, test, &method_name, {__FILE__, __LINE__, __func__}) {__##method_name##_static();} \
} __class_cleanup_attribute {*this}; \
static void method_name()
This attribute is use to add cleanup class method to class test attribute.
Definition: class_cleanup_attribute.h:17
The system namespace contains all fundamental classes to access Hardware, Os, System, and more.

Add cleanup class method to class test.

Library
xtd.tunit
Parameters
method_namecleanup class method to add.

Enumeration Type Documentation

◆ test_state

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

Represent the test state enumeration used bu test.

Namespace
xtd::tunit
Library
xtd.tunit
Enumerator
considered 

Test is considered.

ignored 

Test is ignored.