xtd 0.2.0
Loading...
Searching...
No Matches
xtd::tunit::valid Class Referencefinal
Inheritance diagram for xtd::tunit::valid:
xtd::tunit::base_assert

Definition

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

Namespace
xtd::tunit
Library
xtd.tunit
Remarks
Validations are the same as assertions with the difference, no exception is thrown, but an error is generated.
If a validation fails, he test can be continued to the end or to an assertion is generated.
Examples
This example show how to used some methods :
#include <xtd/xtd.tunit>
#include <stdexcept>
using namespace xtd::tunit;
namespace unit_tests {
// The class test must be declared with test_class_ helper.
class test_class_(test) {
void test_method_(test_case1) {
valid::is_true(true);
}
void test_method_(test_case2) {
valid::is_false(true);
}
void test_method_(test_case3) {
valid::does_not_throw([] {throw std::range_error("error");});
}
};
}
auto main() -> int {
return console_unit_test().run();
}
// This code can produce the following output :
//
// Start 3 tests from 1 test case
// Run tests:
// SUCCEED unit_tests::test.test_case1 (0 ms total)
// FAILED unit_tests::test.test_case2 (0 ms total)
// Expected: false
// But was: true
// Stack Trace: in |---OMITTED---|/valid.cpp:14
// FAILED unit_tests::test.test_case3 (0 ms total)
// Expected: No Exception to be thrown
// But was: <std::range_error>
// Stack Trace: in |---OMITTED---|/valid.cpp:18
//
// Test results:
// SUCCEED 1 test.
// FAILED 2 tests.
// End 3 tests from 1 test case ran. (0 ms total)
The console_unit_test class is console unit test interface.
Definition console_unit_test.h:23
int32 run() noexcept
Runs all tests in this unit_test object and prints the result.
#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

Public Static Methods

template<typename expected_t , typename actual_t >
static void are_equal (const expected_t &expected, const actual_t &actual)
 Validates that two type are equal.
 
template<typename expected_t , typename actual_t >
static void are_equal (const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that two type are equal.
 
template<typename expected_t , typename actual_t >
static void are_equal (const expected_t &expected, const actual_t &actual, const xtd::string &message)
 Validates that two type are equal.
 
template<typename expected_t , typename actual_t >
static void are_equal (const expected_t &expected, const actual_t &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that two type are equal.
 
static void are_equal (float expected, float actual, float tolerance)
 Validates that two type are equal.
 
static void are_equal (float expected, float actual, float tolerance, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that two type are equal.
 
static void are_equal (float expected, float &actual, float tolerance, const xtd::string &message)
 Validates that two type are equal.
 
static void are_equal (float expected, float actual, float tolerance, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that two type are equal.
 
static void are_equal (double expected, double actual, double tolerance)
 Validates that two type are equal.
 
static void are_equal (double expected, double actual, double tolerance, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that two type are equal.
 
static void are_equal (double expected, double actual, double tolerance, const xtd::string &message)
 Validates that two type are equal.
 
static void are_equal (double expected, double actual, double tolerance, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that two type are equal.
 
static void are_equal (long double expected, long double actual, long double tolerance)
 Validates that two type are equal.
 
static void are_equal (long double expected, long double actual, long double tolerance, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that two type are equal.
 
static void are_equal (long double expected, long double actual, long double tolerance, const xtd::string &message)
 Validates that two type are equal.
 
static void are_equal (long double expected, long double actual, long double tolerance, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that two type are equal.
 
template<typename expected_t , typename actual_t >
static void are_not_equal (const expected_t &expected, const actual_t &actual)
 Validates that two type are not equal.
 
template<typename expected_t , typename actual_t >
static void are_not_equal (const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that two type are not equal.
 
template<typename expected_t , typename actual_t >
static void are_not_equal (const expected_t &expected, const actual_t &actual, const xtd::string &message)
 Validates that two type are not equal.
 
template<typename expected_t , typename actual_t >
static void are_not_equal (const expected_t &expected, const actual_t &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that two type are not equal.
 
template<typename expected_t , typename actual_t >
static void are_not_same (const expected_t &expected, const actual_t &actual)
 Validates that two objects do refer to different objects.
 
template<typename expected_t , typename actual_t >
static void are_not_same (const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that two objects do refer to different objects.
 
template<typename expected_t , typename actual_t >
static void are_not_same (const expected_t &expected, const actual_t &actual, const xtd::string &message)
 Validates that two objects do refer to different objects.
 
template<typename expected_t , typename actual_t >
static void are_not_same (const expected_t &expected, const actual_t &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that two objects do refer to different objects.
 
template<typename expected_t , typename actual_t >
static void are_same (const expected_t &expected, const actual_t &actual)
 Validates that two objects do refer to different objects.
 
template<typename expected_t , typename actual_t >
static void are_same (const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that two objects do refer to different objects.
 
template<typename expected_t , typename actual_t >
static void are_same (const expected_t &expected, const actual_t &actual, const xtd::string &message)
 Validates that two objects do refer to different objects.
 
template<typename expected_t , typename actual_t >
static void are_same (const expected_t &expected, const actual_t &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that two objects do refer to different objects.
 
template<typename item_t , typename collection_t >
static void contains (const item_t &item, const collection_t &collection)
 Validates that collection contains an item.
 
template<typename item_t , typename collection_t >
static void contains (const item_t &item, const collection_t &collection, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that collection contains an item.
 
template<typename item_t , typename collection_t >
static void contains (const item_t &item, const collection_t &collection, const xtd::string &message)
 Validates that collection contains an item.
 
template<typename item_t , typename collection_t >
static void contains (const item_t &item, const collection_t &collection, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that collection contains an item.
 
static void does_not_throw (const std::function< void()> &statement)
 Validates that the statement does not throw an exception.
 
static void does_not_throw (const std::function< void()> &statement, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the statement does not throw an exception.
 
static void does_not_throw (const std::function< void()> &statement, const xtd::string &message)
 Validates that the statement does not throw an exception.
 
static void does_not_throw (const std::function< void()> &statement, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the statement does not throw an exception.
 
template<typename value_t >
static void is_empty (const value_t &value)
 Validates that collection contains an item.
 
template<typename value_t >
static void is_empty (const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that collection contains an item.
 
template<typename value_t >
static void is_empty (const value_t &value, const xtd::string &message)
 Validates that collection contains an item.
 
template<typename value_t >
static void is_empty (const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that collection contains an item.
 
static void is_false (bool condition)
 Validates that ta condition is false.
 
static void is_false (bool condition, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that a condition is false.
 
static void is_false (bool condition, const xtd::string &message)
 Validates that a condition is false.
 
static void is_false (bool condition, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that a condition is false.
 
template<typename value1_t , typename value2_t >
static void is_greater (const value1_t &val1, const value2_t &val2)
 Validates that the first value is greater than the second value.
 
template<typename value1_t , typename value2_t >
static void is_greater (const value1_t &val1, const value2_t &val2, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the first value is greater than the second value.
 
template<typename value1_t , typename value2_t >
static void is_greater (const value1_t &val1, const value2_t &val2, const xtd::string &message)
 Validates that the first value is greater than the second value.
 
template<typename value1_t , typename value2_t >
static void is_greater (const value1_t &val1, const value2_t &val2, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the first value is greater than the second value.
 
template<typename value1_t , typename value2_t >
static void is_greater_or_equal (const value1_t &val1, const value2_t &val2)
 Validates that the first value is greater than or equal to the second value.
 
template<typename value1_t , typename value2_t >
static void is_greater_or_equal (const value1_t &val1, const value2_t &val2, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the first value is greater than or equal to the second value.
 
template<typename value1_t , typename value2_t >
static void is_greater_or_equal (const value1_t &val1, const value2_t &val2, const xtd::string &message)
 Validates that the first value is greater than or equal to the second value.
 
template<typename value1_t , typename value2_t >
static void is_greater_or_equal (const value1_t &val1, const value2_t &val2, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the first value is greater than or equal to the second value.
 
template<typename type_t , typename value_t >
static void is_instance_of (const value_t &value)
 Validates that an object is of the type supplied or a derived type.
 
template<typename type_t , typename value_t >
static void is_instance_of (const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that an object is of the type supplied or a derived type.
 
template<typename type_t , typename value_t >
static void is_instance_of (const value_t &value, const xtd::string &message)
 Validates that an object is of the type supplied or a derived type.
 
template<typename type_t , typename value_t >
static void is_instance_of (const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that an object is of the type supplied or a derived type.
 
template<typename value1_t , typename value2_t >
static void is_less (const value1_t &val1, const value2_t &val2)
 Validates that the first value is is_less than the second value.
 
template<typename value1_t , typename value2_t >
static void is_less (const value1_t &val1, const value2_t &val2, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the first value is is_less than the second value.
 
template<typename value1_t , typename value2_t >
static void is_less (const value1_t &val1, const value2_t &val2, const xtd::string &message)
 Validates that the first value is is_less than the second value.
 
template<typename value1_t , typename value2_t >
static void is_less (const value1_t &val1, const value2_t &val2, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the first value is is_less than the second value.
 
template<typename value1_t , typename value2_t >
static void is_less_or_equal (const value1_t &val1, const value2_t &val2)
 Validates that the first value is is_less than or equal to the second value.
 
template<typename value1_t , typename value2_t >
static void is_less_or_equal (const value1_t &val1, const value2_t &val2, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the first value is is_less than or equal to the second value.
 
template<typename value1_t , typename value2_t >
static void is_less_or_equal (const value1_t &val1, const value2_t &val2, const xtd::string &message)
 Validates that the first value is is_less than or equal to the second value.
 
template<typename value1_t , typename value2_t >
static void is_less_or_equal (const value1_t &val1, const value2_t &val2, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the first value is is_less than or equal to the second value.
 
static void is_NaN (double value)
 that a value is NaN.
 
static void is_NaN (double value, const xtd::diagnostics::stack_frame &stack_frame)
 that a value is NaN.
 
static void is_NaN (double value, const xtd::string &message)
 Validates that a value is NaN.
 
static void is_NaN (double value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that a value is NaN.
 
static void is_NaN (long double value)
 that a value is NaN.
 
static void is_NaN (long double value, const xtd::diagnostics::stack_frame &stack_frame)
 that a value is NaN.
 
static void is_NaN (long double value, const xtd::string &message)
 Validates that a value is NaN.
 
static void is_NaN (long double value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that a value is NaN.
 
static void is_NaN (float value)
 that a value is NaN.
 
static void is_NaN (float value, const xtd::diagnostics::stack_frame &stack_frame)
 that a value is NaN.
 
static void is_NaN (float value, const xtd::string &message)
 Validates that a value is NaN.
 
static void is_NaN (float value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that a value is NaN.
 
template<typename value_t >
static void is_negative (const value_t &value)
 Validates that ta condition is negative.
 
template<typename value_t >
static void is_negative (const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that ta condition is negative.
 
template<typename value_t >
static void is_negative (const value_t &value, const xtd::string &message)
 Validates that ta condition is negative.
 
template<typename value_t >
static void is_negative (const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that ta condition is negative.
 
template<typename value_t >
static void is_not_empty (const value_t &value)
 Validates that collection oes not contain any item.
 
template<typename value_t >
static void is_not_empty (const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that collection does not contain any item.
 
template<typename value_t >
static void is_not_empty (const value_t &value, const xtd::string &message)
 Validates that collection does not contain any item.
 
template<typename value_t >
static void is_not_empty (const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that collection does not contain any item.
 
template<typename type_t , typename value_t >
static void is_not_instance_of (const value_t &value)
 Validates that an object is not of the type supplied or a derived type.
 
template<typename type_t , typename value_t >
static void is_not_instance_of (const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that an object is not of the type supplied or a derived type.
 
template<typename type_t , typename value_t >
static void is_not_instance_of (const value_t &value, const xtd::string &message)
 Validates that an object is not of the type supplied or a derived type.
 
template<typename type_t , typename value_t >
static void is_not_instance_of (const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that an object is not of the type supplied or a derived type.
 
template<typename pointer_t >
static void is_not_null (const pointer_t *pointer)
 Validates that the pointer is not null.
 
template<typename pointer_t >
static void is_not_null (const pointer_t *pointer, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is not null.
 
template<typename pointer_t >
static void is_not_null (const pointer_t *pointer, const xtd::string &message)
 Validates that the pointer is not null.
 
template<typename pointer_t >
static void is_not_null (const pointer_t *pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is not null.
 
template<typename optional_t >
static void is_not_null (const std::optional< optional_t > &opt)
 Validates that the optional is not std::nullopt.
 
template<typename optional_t >
static void is_not_null (const std::optional< optional_t > &opt, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the optional is not std::nullopt.
 
template<typename optional_t >
static void is_not_null (const std::optional< optional_t > &opt, const xtd::string &message)
 Validates that the optional is not std::nullopt.
 
template<typename optional_t >
static void is_not_null (const std::optional< optional_t > &opt, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the optional is not std::nullopt.
 
template<typename pointer_t >
static void is_not_null (const xtd::uptr< pointer_t > &pointer)
 Validates that the pointer is not null.
 
template<typename pointer_t >
static void is_not_null (const xtd::uptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is not null.
 
template<typename pointer_t >
static void is_not_null (const xtd::uptr< pointer_t > &pointer, const xtd::string &message)
 Validates that the pointer is not null.
 
template<typename pointer_t >
static void is_not_null (const xtd::uptr< pointer_t > &pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is not null.
 
template<typename pointer_t >
static void is_not_null (const xtd::sptr< pointer_t > &pointer)
 Validates that the pointer is not null.
 
template<typename pointer_t >
static void is_not_null (const xtd::sptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is not null.
 
template<typename pointer_t >
static void is_not_null (const xtd::sptr< pointer_t > &pointer, const xtd::string &message)
 Validates that the pointer is not null.
 
template<typename pointer_t >
static void is_not_null (const xtd::sptr< pointer_t > &pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is not null.
 
template<typename pointer_t >
static void is_not_null (const xtd::wptr< pointer_t > &pointer)
 Validates that the pointer is not null.
 
template<typename pointer_t >
static void is_not_null (const xtd::wptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is not null.
 
template<typename pointer_t >
static void is_not_null (const xtd::wptr< pointer_t > &pointer, const xtd::string &message)
 Validates that the pointer is not null.
 
template<typename pointer_t >
static void is_not_null (const xtd::wptr< pointer_t > &pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is not null.
 
static void is_not_null (std::nullptr_t pointer)
 Validates that the pointer is not null.
 
static void is_not_null (std::nullptr_t pointer, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is not null.
 
static void is_not_null (std::nullptr_t pointer, const xtd::string &message)
 Validates that the pointer is not null.
 
static void is_not_null (std::nullptr_t pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is not null.
 
template<typename value_t >
static void is_not_zero (const value_t &value)
 Validates that ta condition is not zero.
 
template<typename value_t >
static void is_not_zero (const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that ta condition is not zero.
 
template<typename value_t >
static void is_not_zero (const value_t &value, const xtd::string &message)
 Validates that ta condition is not zero.
 
template<typename value_t >
static void is_not_zero (const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that ta condition is not zero.
 
template<typename pointer_t >
static void is_null (const pointer_t *pointer)
 Validates that the pointer is null.
 
template<typename pointer_t >
static void is_null (const pointer_t *pointer, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is null.
 
template<typename pointer_t >
static void is_null (const pointer_t *pointer, const xtd::string &message)
 Validates that the pointer is null.
 
template<typename pointer_t >
static void is_null (const pointer_t *pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is null.
 
template<typename optional_t >
static void is_null (const std::optional< optional_t > &opt)
 Validates that the optional is std::nullopt.
 
template<typename optional_t >
static void is_null (const std::optional< optional_t > &opt, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the optional is std::nullopt.
 
template<typename optional_t >
static void is_null (const std::optional< optional_t > &opt, const xtd::string &message)
 Validates that the optional is std::nullopt.
 
template<typename optional_t >
static void is_null (const std::optional< optional_t > &opt, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the optional is std::nullopt.
 
template<typename pointer_t >
static void is_null (const xtd::uptr< pointer_t > &pointer)
 Validates that the pointer is null.
 
template<typename pointer_t >
static void is_null (const xtd::uptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is null.
 
template<typename pointer_t >
static void is_null (const xtd::uptr< pointer_t > &pointer, const xtd::string &message)
 Validates that the pointer is null.
 
template<typename pointer_t >
static void is_null (const xtd::uptr< pointer_t > &pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is null.
 
template<typename pointer_t >
static void is_null (const xtd::sptr< pointer_t > &pointer)
 Validates that the pointer is null.
 
template<typename pointer_t >
static void is_null (const xtd::sptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is null.
 
template<typename pointer_t >
static void is_null (const xtd::sptr< pointer_t > &pointer, const xtd::string &message)
 Validates that the pointer is null.
 
template<typename pointer_t >
static void is_null (const xtd::sptr< pointer_t > &pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is null.
 
template<typename pointer_t >
static void is_null (const xtd::wptr< pointer_t > &pointer)
 Validates that the pointer is null.
 
template<typename pointer_t >
static void is_null (const xtd::wptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is null.
 
template<typename pointer_t >
static void is_null (const xtd::wptr< pointer_t > &pointer, const xtd::string &message)
 Validates that the pointer is null.
 
template<typename pointer_t >
static void is_null (const xtd::wptr< pointer_t > &pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is null.
 
static void is_null (std::nullptr_t pointer)
 Validates that the pointer is null.
 
static void is_null (std::nullptr_t pointer, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is null.
 
static void is_null (std::nullptr_t pointer, const xtd::string &message)
 Validates that the pointer is null.
 
static void is_null (std::nullptr_t pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the pointer is null.
 
template<typename value_t >
static void is_positive (const value_t &value)
 Validates that ta condition is positive.
 
template<typename value_t >
static void is_positive (const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that ta condition is positive.
 
template<typename value_t >
static void is_positive (const value_t &value, const xtd::string &message)
 Validates that ta condition is positive.
 
template<typename value_t >
static void is_positive (const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that ta condition is positive.
 
static void is_true (bool condition)
 Validates that ta condition is true.
 
static void is_true (bool condition, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that a condition is true.
 
static void is_true (bool condition, const xtd::string &message)
 Validates that a condition is true.
 
static void is_true (bool condition, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that a condition is true.
 
template<typename value_t >
static void is_zero (const value_t &value)
 Validates that ta condition is zero.
 
template<typename value_t >
static void is_zero (const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that ta condition is zero.
 
template<typename value_t >
static void is_zero (const value_t &value, const xtd::string &message)
 Validates that ta condition is zero.
 
template<typename value_t >
static void is_zero (const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that ta condition is zero.
 
template<typename exception_t >
static void throws (const std::function< void()> &statement)
 Validates that the statement throws a particular exception when called.
 
template<typename exception_t >
static void throws (const std::function< void()> &statement, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the statement throws a particular exception when called.
 
template<typename exception_t >
static void throws (const std::function< void()> &statement, const xtd::string &message)
 Validates that the statement throws a particular exception when called.
 
template<typename exception_t >
static void throws (const std::function< void()> &statement, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the statement throws a particular exception when called.
 
static void throws_any (const std::function< void()> &statement)
 Validates that the statement does not throw an exception.
 
static void throws_any (const std::function< void()> &statement, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the statement does not throw an exception.
 
static void throws_any (const std::function< void()> &statement, const xtd::string &message)
 Validates that the statement does not throw an exception.
 
static void throws_any (const std::function< void()> &statement, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
 Validates that the statement does not throw an exception.
 

The documentation for this class was generated from the following file:
  • xtd.tunit/include/xtd/tunit/valid.h