xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Classes | Macros | Enumerations
xtd.tunit

Definition

The xtd.tunit library contains compnents needed for unit testing.

Classes

class  xtd::tunit::abort_error
 Exception thow when abort. More...
 
class  xtd::tunit::assert
 The assert class contains a collection of static methods that implement the most common assertions used in xtd::tUnit. More...
 
class  xtd::tunit::assert_error
 Exception thow when an assertion failed. More...
 
class  xtd::tunit::assume
 The assume class contains a collection of static methods that implement the most common assertions used in xtd::tUnit. More...
 
class  xtd::tunit::base_assert
 Thebase class for assert. More...
 
class  xtd::tunit::class_cleanup_attribute
 This attribute is use to add cleaup 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::collection_assert
 The collection_assert class contains a collection of static methods that implement the most collection assertions used in xtd::tUnit. More...
 
class  xtd::tunit::collection_assume
 The collection_assume class contains a collection of static methods that implement the most collection assertions used in xtd::tUnit. More...
 
class  xtd::tunit::collection_valid
 The collection_valid class contains a collection of static methods that implement the most collection assertions used in xtd::tUnit. More...
 
class  xtd::tunit::console_unit_test
 The console_unit_test class is console unit test interface. More...
 
class  xtd::tunit::directory_assert
 The directory_assert class contains a collection of static methods that implement the most directory assertions used in xtd::tUnit. More...
 
class  xtd::tunit::directory_assume
 The directory_assume class contains a collection of static methods that implement the most directory assertions used in xtd::tUnit. More...
 
class  xtd::tunit::directory_valid
 The directory_valid class contains a collection of static methods that implement the most directory assertions used in xtd::tUnit. 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::file_assert
 The file_assert class contains a collection of static methods that implement the most file assertions used in xtd::tUnit. More...
 
class  xtd::tunit::file_assume
 The file_assume class contains a collection of static methods that implement the most file assertions used in xtd::tUnit. More...
 
class  xtd::tunit::file_valid
 The file_valid class contains a collection of static methods that implement the most file assertions used in xtd::tUnit. More...
 
class  xtd::tunit::ignore_error
 Exception thow when ignore. 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::string_assert
 The string_assert class contains a collection of static methods that implement the most string assertions used in xtd::tUnit. More...
 
class  xtd::tunit::string_assume
 The string_assume class contains a collection of static methods that implement the most string assertions used in xtd::tUnit. More...
 
class  xtd::tunit::string_valid
 The string_valid class contains a collection of static methods that implement the most string assertions used in xtd::tUnit. 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...
 
class  xtd::tunit::valid
 The valid class contains a collection of static methods that implement the most common assertions used in xtd::tUnit. More...
 

Macros

#define class_cleanup_(method_name)
 add cleaup class method to class test. More...
 
#define class_initialize_(method_name)
 add initialize 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 cleaup 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 cleaup class method to class test.

Library
xtd.tunit
Parameters
method_namecleanup class method to add.

◆ class_initialize_

#define class_initialize_ (   method_name)

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

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

add initialize class method to class test.

Parameters
method_namecleanup class method to add.
Library
xtd.tunit

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.