The base class for assert.
Public Static Methods | |
static void | abort (const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) |
Abort current test. This is used by the other assert functions. | |
static void | abort (const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) |
Abort current test. This is used by the other assert functions. | |
static void | fail (const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) |
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions. | |
static void | fail (const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) |
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions. | |
static void | ignore (const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) |
Ignore current test. This is used by the other assert functions. | |
static void | ignore (const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) |
Ignore current test. This is used by the other assert functions. | |
static void | succeed (const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) |
Generates a success with a generic message. This is used by the other assert functions. | |
static void | succeed (const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) |
Generates a success with a generic message. This is used by the other assert functions. | |
Protected Methods | |
static void | error () |
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions. | |
static void | error (const xtd::string &message) |
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions. | |
static void | error (const xtd::string &actual, const xtd::string &expected, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) |
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions. | |
static void | fail (const xtd::string &actual, const xtd::string &expected, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) |
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions. | |
template<class value_t > | |
static xtd::string | to_string (const value_t &value) |
Convert specified value to xtd::string. | |
template<class value_t > | |
static xtd::string | to_string (const value_t *value) |
Convert specified value to xtd::string. | |
template<class collection_t > | |
static xtd::string | join_items (const collection_t &collection) |
Join specified collection into xtd::string. | |
static xtd::string | join_items (const xtd::string &str) |
Join specified string into xtd::string. | |
Protected Static Methods | |
template<class value_a_t , class value_b_t > | |
static bool | equals (const value_a_t &value_a, const value_b_t &value_b) |
Determines if specified values are equal. | |
template<class char_t > | |
static bool | equals (const char_t *value_a, const string &value_b) |
Determines if specified values are equal. | |
template<class char_t > | |
static bool | equals (const string &value_a, const char_t *value_b) |
Determines if specified values are equal. | |
static bool | equals (long double value_a, long double value_b) |
Determines if specified values are equal. | |
static bool | equals (double value_a, double value_b) |
Determines if specified values are equal. | |
static bool | equals (float value_a, float value_b) |
Determines if specified values are equal. | |
static bool | equals (double value_a, double value_b, double tolerance) |
Determines if specified values are equal with tolerance. | |
static bool | equals (long double value_a, long double value_b, long double tolerance) |
Determines if specified values are equal with tolerance. | |
static bool | equals (float value_a, float value_b, float tolerance) |
Determines if specified values are equal with tolerance. | |
|
static |
Abort current test. This is used by the other assert functions.
stack_frame | Contains information about current file and current line. |
xtd::tunit::assert_error | If bad assertion. |
|
static |
Abort current test. This is used by the other assert functions.
message | A user message to display if the assertion fails. This message can be seen in the unit test results. |
stack_frame | Contains information about current file and current line. |
|
static |
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions.
stack_frame | Contains information about current file and current line. |
xtd::tunit::assert_error | If bad assertion. |
|
static |
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions.
message | A user message to display if the assertion fails. This message can be seen in the unit test results. |
stack_frame | Contains information about current file and current line. |
xtd::tunit::assert_error | If bad assertion. |
|
static |
Ignore current test. This is used by the other assert functions.
stack_frame | Contains information about current file and current line. |
xtd::tunit::assert_error | If bad assertion. |
|
static |
Ignore current test. This is used by the other assert functions.
message | A user message to display if the assertion fails. This message can be seen in the unit test results. |
stack_frame | Contains information about current file and current line. |
|
static |
Generates a success with a generic message. This is used by the other assert functions.
message | A user message to display if the assertion fails. This message can be seen in the unit test results. |
|
static |
Generates a success with a generic message. This is used by the other assert functions.
message | A user message to display if the assertion fails. This message can be seen in the unit test results. |
stack_frame | Contains information about current file and current line. |
|
staticprotected |
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions.
xtd::tunit::assert_error | If bad assertion. |
|
staticprotected |
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions.
xtd::tunit::assert_error | If bad assertion. |
|
staticprotected |
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions.
xtd::tunit::assert_error | If bad assertion. |
|
staticprotected |
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions.
xtd::tunit::assert_error | If bad assertion. |
|
inlinestaticprotected |
Convert specified value to xtd::string.
value | The value to convert to xtd::string. |
|
inlinestaticprotected |
Convert specified value to xtd::string.
value | The value to convert to xtd::string. |
|
inlinestaticprotected |
Join specified collection into xtd::string.
collection | The collection to join into xtd::string. |
|
staticprotected |
Join specified string into xtd::string.
str | The joined to join into xtd::string. |
|
inlinestaticprotected |
Determines if specified values are equal.
value_a | The first value. |
value_a | The second value. |
true
if value_a
is equal to value_b
; otherwise false
.
|
inlinestaticprotected |
Determines if specified values are equal.
value_a | The first value. |
value_a | The second value. |
true
if value_a
is equal to value_b
; otherwise false
.
|
inlinestaticprotected |
Determines if specified values are equal.
value_a | The first value. |
value_a | The second value. |
true
if value_a
is equal to value_b
; otherwise false
.
|
inlinestaticprotected |
Determines if specified values are equal.
value_a | The first value. |
value_a | The second value. |
true
if value_a
is equal to value_b
; otherwise false
.
|
inlinestaticprotected |
Determines if specified values are equal.
value_a | The first value. |
value_a | The second value. |
true
if value_a
is equal to value_b
; otherwise false
.
|
inlinestaticprotected |
Determines if specified values are equal.
value_a | The first value. |
value_a | The second value. |
true
if value_a
is equal to value_b
; otherwise false
.
|
inlinestaticprotected |
Determines if specified values are equal with tolerance.
value_a | The first value. |
value_a | The second value. |
tolerance | Indicates a tolerance within which they will be considered as equal in percent. For example 0.0001l repsesent 0.01%. |
true
if value_a
is equal to value_b
; otherwise false
.
|
inlinestaticprotected |
Determines if specified values are equal with tolerance.
value_a | The first value. |
value_a | The second value. |
tolerance | Indicates a tolerance within which they will be considered as equal in percent. For example 0.0001 repsesent 0.01%. |
true
if value_a
is equal to value_b
; otherwise false
.
|
inlinestaticprotected |
Determines if specified values are equal with tolerance.
value_a | The first value. |
value_a | The second value. |
tolerance | Indicates a tolerance within which they will be considered as equal in percent. For example 0.0001f repsesent 0.01%. |
true
if value_a
is equal to value_b
; otherwise false
.