xtd 0.2.0
assert.h File Reference
#include "base_assert.h"
#include <algorithm>
#include <cmath>
#include <cstring>
#include <exception>
#include <functional>
#include <iterator>
#include <memory>

Definition

Contains xtd::tunit::assert class.

Include dependency graph for assert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  xtd::tunit::assert
 The assert class contains a collection of static methods that implement the most common assertions used in xtd::tUnit. More...
 

Namespaces

 xtd
 The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
 
 xtd::tunit
 The tunit namespace contains a unit test library.
 

Macros

#define abort_()   abort(csf_)
 Abort current test. This is used by the other assert functions. More...
 
#define are_equal_(...)   __CMD_ASSERT_ARGS(are_equal, __VA_ARGS__)
 Asserts that two type are equal. More...
 
#define are_not_equal_(...)   __CMD_ASSERT_ARGS(are_not_equal, __VA_ARGS__)
 Asserts that two type are not equal. More...
 
#define are_not_same_(...)   __CMD_ASSERT_ARGS(are_not_same, __VA_ARGS__)
 Asserts that two objects do refer to differents objects. More...
 
#define are_same_(...)   __CMD_ASSERT_ARGS(are_same, __VA_ARGS__)
 Asserts that two objects do refer to same objects. More...
 
#define contains_(...)   __CMD_ASSERT_ARGS(contains, __VA_ARGS__)
 Asserts that collection contains an item. More...
 
#define does_not_throw_(...)   __CMD_ASSERT_ARGS(does_not_throw, __VA_ARGS__)
 Asserts that the staement does not throw an exception. More...
 
#define fail_(...)   __CMD_ASSERT_ARGS(fail, __VA_ARGS__)
 Throws an xtd::tunit::assert_error exception. This is used by the other assert functions. More...
 
#define ignore_(...)   __CMD_ASSERT_ARGS(ignore, __VA_ARGS__)
 Ignore current test. This is used by the other assert functions. More...
 
#define is_empty_(...)   __CMD_ASSERT_ARGS(is_empty, __VA_ARGS__)
 Asserts that collection contains an item. More...
 
#define is_false_(...)   __CMD_ASSERT_ARGS(is_false, __VA_ARGS__)
 Asserts that a condition is false. More...
 
#define is_greater_(...)   __CMD_ASSERT_ARGS(is_greater, __VA_ARGS__)
 Asserts that the first value is greater than the second value. More...
 
#define is_greater_or_equal_(...)   __CMD_ASSERT_ARGS(is_greater_or_equal, __VA_ARGS__)
 Asserts that the first value is greater than or equal to the second value. More...
 
#define is_instance_of_(type_t, ...)   __CMD_ASSERT_ARGS(is_instance_of<type_t>, __VA_ARGS__)
 Asserts that an object is of the type supplied or a derived type. More...
 
#define is_less_(...)   __CMD_ASSERT_ARGS(is_less, __VA_ARGS__)
 Asserts that the first value is is_less than the second value. More...
 
#define is_less_or_equal_(...)   __CMD_ASSERT_ARGS(is_less_or_equal, __VA_ARGS__)
 Asserts that the first value is is_less than or equal to the second value. More...
 
#define is_NaN_(...)   __CMD_ASSERT_ARGS(is_NaN, __VA_ARGS__)
 Asserts that a value is NaN. More...
 
#define is_negative_(...)   __CMD_ASSERT_ARGS(is_negative, __VA_ARGS__)
 Asserts that ta condition is negative. More...
 
#define is_not_empty_(...)   __CMD_ASSERT_ARGS(is_not_empty, __VA_ARGS__)
 Asserts that collection does not contain any item. More...
 
#define is_not_instance_of_(type_t, ...)   __CMD_ASSERT_ARGS(is_not_instance_of<type_t>, __VA_ARGS__)
 Asserts that an object is not of the type supplied or a derived type. More...
 
#define is_not_null_(...)   __CMD_ASSERT_ARGS(is_not_null, __VA_ARGS__)
 Asserts that the pointer is not null. More...
 
#define is_not_zero_(...)   __CMD_ASSERT_ARGS(is_not_zero, __VA_ARGS__)
 Asserts that ta condition is not zero. More...
 
#define is_null_(...)   __CMD_ASSERT_ARGS(is_null, __VA_ARGS__)
 Asserts that the pointer is null. More...
 
#define is_positive_(...)   __CMD_ASSERT_ARGS(is_positive, __VA_ARGS__)
 Asserts that ta condition is positive. More...
 
#define is_true_(...)   __CMD_ASSERT_ARGS(is_true, __VA_ARGS__)
 Asserts that a condition is true. More...
 
#define is_zero_(...)   __CMD_ASSERT_ARGS(is_zero, __VA_ARGS__)
 Asserts that ta condition is zero. More...
 
#define succeed_(...)   __CMD_ASSERT_ARGS(succeed, __VA_ARGS__)
 Generates a success with a generic message. This is used by the other assert functions. More...
 
#define throws_(exception_t, ...)   __CMD_ASSERT_ARGS(throws<exception_t>, __VA_ARGS__)
 Asserts that the statement throws a particular exception when called. More...
 
#define throws_any_(...)   __CMD_ASSERT_ARGS(throws_any, __VA_ARGS__)
 Asserts that the staement does not throw an exception. More...