48 template<
typename expected_t,
typename actual_t>
60 template<
typename expected_t,
typename actual_t>
72 template<
typename expected_t,
typename actual_t>
85 template<
typename expected_t,
typename actual_t>
87 if (actual == expected)
88 succeed(message, stack_frame);
95#if defined(__cpp_lib_char8_t)
117 static void are_equal(
float expected,
float actual,
float tolerance);
169 static void are_equal(
double expected,
double actual,
double tolerance);
221 static void are_equal(
long double expected,
long double actual,
long double tolerance);
247 static void are_equal(
long double expected,
long double actual,
long double tolerance,
const xtd::ustring& message);
272 template<
typename expected_t,
typename actual_t>
284 template<
typename expected_t,
typename actual_t>
296 template<
typename expected_t,
typename actual_t>
309 template<
typename expected_t,
typename actual_t>
311 if (actual != expected)
312 succeed(message, stack_frame);
319#if defined(__cpp_lib_char8_t)
339 template<
typename expected_t,
typename actual_t>
354 template<
typename expected_t,
typename actual_t>
369 template<
typename expected_t,
typename actual_t>
385 template<
typename expected_t,
typename actual_t>
387 if (&actual != &expected)
388 succeed(message, stack_frame);
405 template<
typename expected_t,
typename actual_t>
420 template<
typename expected_t,
typename actual_t>
435 template<
typename expected_t,
typename actual_t>
451 template<
typename expected_t,
typename actual_t>
453 if (&actual == &expected)
454 succeed(message, stack_frame);
469 template<
typename item_t,
typename collection_t>
482 template<
typename item_t,
typename collection_t>
495 template<
typename item_t,
typename collection_t>
509 template<
typename item_t,
typename collection_t>
511 auto result = std::find(collection.begin(), collection.end(), item);
512 if (result != collection.end())
513 succeed(message, stack_frame);
515 fail(
"collection containing " +
to_string(item), join_items(collection), message, stack_frame);
519 template<
typename item_t,
typename value_t>
521 template<
typename item_t,
typename value_t>
522 static void contains(
const item_t& item,
const std::initializer_list<value_t>& values,
const xtd::diagnostics::stack_frame& stack_frame) {contains(item, values,
"", stack_frame);}
523 template<
typename item_t,
typename value_t>
525 template<
typename item_t,
typename value_t>
527 auto result = std::find(values.begin(), values.end(), item);
528 if (result != values.end())
529 succeed(message, stack_frame);
531 fail(
"collection containing " +
to_string(item), join_items(values), message, stack_frame);
534#if defined(__cpp_lib_char8_t)
597 template<
typename value_t>
610 template<
typename value_t>
623 template<
typename value_t>
637 template<
typename value_t>
639 if (std::empty(value))
640 succeed(message, stack_frame);
642 fail(
"collection <empty>", join_items(value), message, stack_frame);
646 template<
typename value_t>
648 template<
typename value_t>
649 static void is_empty(
const std::initializer_list<value_t>& value,
const xtd::diagnostics::stack_frame& stack_frame) {is_empty(value,
"", stack_frame);}
650 template<
typename value_t>
652 template<
typename value_t>
654 if (std::empty(values))
655 succeed(message, stack_frame);
657 fail(
"collection <empty>", join_items(values), message, stack_frame);
660#if defined(__cpp_lib_char8_t)
726 template<
typename value1_t,
typename value2_t>
738 template<
typename value1_t,
typename value2_t>
750 template<
typename value1_t,
typename value2_t>
763 template<
typename value1_t,
typename value2_t>
766 succeed(message, stack_frame);
773#if defined(__cpp_lib_char8_t)
791 template<
typename value1_t,
typename value2_t>
804 template<
typename value1_t,
typename value2_t>
817 template<
typename value1_t,
typename value2_t>
831 template<
typename value1_t,
typename value2_t>
834 succeed(message, stack_frame);
836 fail(
"greater than or equal to " +
to_string(val2),
to_string(val1), message, stack_frame);
841#if defined(__cpp_lib_char8_t)
858 template<
typename type_t,
typename value_t>
870 template<
typename type_t,
typename value_t>
882 template<
typename type_t,
typename value_t>
895 template<
typename type_t,
typename value_t>
897 const type_t* instance =
dynamic_cast<const type_t*
>(&value);
898 if (instance !=
nullptr)
899 succeed(message, stack_frame);
901 fail(
"instance of <" + typeof_<type_t>().full_name() +
">",
"<" +
typeof_(value).full_name() +
">", message, stack_frame);
913 template<
typename value1_t,
typename value2_t>
925 template<
typename value1_t,
typename value2_t>
937 template<
typename value1_t,
typename value2_t>
950 template<
typename value1_t,
typename value2_t>
953 succeed(message, stack_frame);
960#if defined(__cpp_lib_char8_t)
978 template<
typename value1_t,
typename value2_t>
991 template<
typename value1_t,
typename value2_t>
1004 template<
typename value1_t,
typename value2_t>
1018 template<
typename value1_t,
typename value2_t>
1021 succeed(message, stack_frame);
1023 fail(
"less than or equal to " +
to_string(val2),
to_string(val1), message, stack_frame);
1028#if defined(__cpp_lib_char8_t)
1191 template<
typename value_t>
1204 template<
typename value_t>
1217 template<
typename value_t>
1231 template<
typename value_t>
1234 succeed(message, stack_frame);
1236 fail(
"negative",
to_string(value), message, stack_frame);
1249 template<
typename value_t>
1262 template<
typename value_t>
1275 template<
typename value_t>
1289 template<
typename value_t>
1291 if (!std::empty(value))
1292 succeed(message, stack_frame);
1294 fail(
"collection not <empty>",
"<empty>", message, stack_frame);
1298 template<
typename value_t>
1300 template<
typename value_t>
1301 static void is_not_empty(
const std::initializer_list<value_t>& value,
const xtd::diagnostics::stack_frame& stack_frame) {is_not_empty(value,
"", stack_frame);}
1302 template<
typename value_t>
1304 template<
typename value_t>
1306 if (!std::empty(value))
1307 succeed(message, stack_frame);
1309 fail(
"collection not <empty>",
"<empty>", message, stack_frame);
1312#if defined(__cpp_lib_char8_t)
1329 template<
typename type_t,
typename value_t>
1341 template<
typename type_t,
typename value_t>
1353 template<
typename type_t,
typename value_t>
1366 template<
typename type_t,
typename value_t>
1368 const type_t* instance =
dynamic_cast<const type_t*
>(&value);
1369 if (instance ==
nullptr)
1370 succeed(message, stack_frame);
1372 fail(
"not instance of <" + typeof_<type_t>().full_name() +
">",
"<" +
typeof_(value).full_name() +
">", message, stack_frame);
1386 template<
typename po
inter_t>
1400 template<
typename po
inter_t>
1414 template<
typename po
inter_t>
1429 template<
typename po
inter_t>
1431 if (pointer !=
nullptr)
1432 succeed(message, stack_frame);
1434 fail(
"not null",
"null", message, stack_frame);
1446 template<
typename optional_t>
1459 template<
typename optional_t>
1472 template<
typename optional_t>
1486 template<
typename optional_t>
1488 if (opt != std::nullopt)
1489 succeed(message, stack_frame);
1491 fail(
"not null",
"null", message, stack_frame);
1503 template<
typename po
inter_t>
1516 template<
typename po
inter_t>
1529 template<
typename po
inter_t>
1543 template<
typename po
inter_t>
1545 if (pointer !=
nullptr)
1546 succeed(message, stack_frame);
1548 fail(
"not null",
"null", message, stack_frame);
1560 template<
typename po
inter_t>
1573 template<
typename po
inter_t>
1586 template<
typename po
inter_t>
1600 template<
typename po
inter_t>
1602 if (pointer !=
nullptr)
1603 succeed(message, stack_frame);
1605 fail(
"not null",
"null", message, stack_frame);
1617 template<
typename po
inter_t>
1630 template<
typename po
inter_t>
1643 template<
typename po
inter_t>
1657 template<
typename po
inter_t>
1659 if (pointer.owner_before(std::weak_ptr<pointer_t> {}) || std::weak_ptr<pointer_t> {}.owner_before(pointer))
1660 succeed(message, stack_frame);
1662 fail(
"not null",
"null", message, stack_frame);
1715 template<
typename value_t>
1728 template<
typename value_t>
1741 template<
typename value_t>
1755 template<
typename value_t>
1758 succeed(message, stack_frame);
1760 fail(
"not zero",
"0", message, stack_frame);
1774 template<
typename po
inter_t>
1788 template<
typename po
inter_t>
1802 template<
typename po
inter_t>
1817 template<
typename po
inter_t>
1819 if (pointer ==
nullptr)
1820 succeed(message, stack_frame);
1822 fail(
"null",
"not null", message, stack_frame);
1834 template<
typename optional_t>
1847 template<
typename optional_t>
1860 template<
typename optional_t>
1874 template<
typename optional_t>
1876 if (opt == std::nullopt)
1877 succeed(message, stack_frame);
1879 fail(
"null",
"not null", message, stack_frame);
1891 template<
typename po
inter_t>
1904 template<
typename po
inter_t>
1917 template<
typename po
inter_t>
1931 template<
typename po
inter_t>
1933 if (pointer ==
nullptr)
1934 succeed(message, stack_frame);
1936 fail(
"null",
"not null", message, stack_frame);
1948 template<
typename po
inter_t>
1961 template<
typename po
inter_t>
1974 template<
typename po
inter_t>
1988 template<
typename po
inter_t>
1990 if (pointer ==
nullptr)
1991 succeed(message, stack_frame);
1993 fail(
"null",
"not null", message, stack_frame);
2006 template<
typename po
inter_t>
2020 template<
typename po
inter_t>
2034 template<
typename po
inter_t>
2049 template<
typename po
inter_t>
2051 if (!pointer.owner_before(std::weak_ptr<pointer_t> {}) && !std::weak_ptr<pointer_t> {}.owner_before(pointer))
2052 succeed(message, stack_frame);
2054 fail(
"null",
"not null", message, stack_frame);
2107 template<
typename value_t>
2120 template<
typename value_t>
2133 template<
typename value_t>
2147 template<
typename value_t>
2150 succeed(message, stack_frame);
2152 fail(
"positive",
to_string(value), message, stack_frame);
2214 template<
typename value_t>
2227 template<
typename value_t>
2240 template<
typename value_t>
2254 template<
typename value_t>
2256 if (value ==
static_cast<value_t
>(0))
2257 succeed(message, stack_frame);
2259 fail(
"zero",
to_string(value), message, stack_frame);
2272 template<
typename exception_t>
2285 template<
typename exception_t>
2298 template<
typename exception_t>
2312 template<
typename exception_t>
2316 fail(
"<" + typeof_<exception_t>().full_name() +
">",
"<nothing>", message, stack_frame);
2317 }
catch (
const exception_t&) {
2318 succeed(message, stack_frame);
2321 }
catch (
const std::exception&
e) {
2322 fail(
"<" + typeof_<exception_t>().full_name() +
">",
"<" +
typeof_(
e).full_name() +
">", message, stack_frame);
2324 fail(
"<" + typeof_<exception_t>().full_name() +
">",
"<exception>", message, stack_frame);
2380#define __CMD_ASSERT_0_ARGS__(cmd) cmd(csf_)
2381#define __CMD_ASSERT_1_ARGS__(cmd, arg1) cmd(arg1, csf_)
2382#define __CMD_ASSERT_2_ARGS__(cmd, arg1, arg2) cmd(arg1, arg2, csf_)
2383#define __CMD_ASSERT_3_ARGS__(cmd, arg1, arg2, arg3) cmd(arg1, arg2, arg3, csf_)
2384#define __CMD_ASSERT_4_ARGS__(cmd, arg1, arg2, arg3, arg4) cmd(arg1, arg2, arg3, arg4, csf_)
2385#define __CMD_ASSERT_5_ARGS__(cmd, arg1, arg2, arg3, arg4) cmd(arg1, arg2, arg3, arg4, arg5, csf_)
2386#define __GET_LAST_ARG(arg1, arg2, arg3, arg4, arg5, arg6, ...) arg6
2387#define __CMD_ASSERT_MACRO_CHOOSER(cmd, ...) __GET_LAST_ARG(__VA_ARGS__, __CMD_ASSERT_5_ARGS__, __CMD_ASSERT_4_ARGS__, __CMD_ASSERT_3_ARGS__, __CMD_ASSERT_2_ARGS__, __CMD_ASSERT_1_ARGS__, __CMD_ASSERT_0_ARGS__, )
2388#define __CMD_ASSERT_ARGS(cmd, ...) __CMD_ASSERT_MACRO_CHOOSER(cmd, __VA_ARGS__)(cmd, __VA_ARGS__)
2402#define abort_() abort(csf_)
2417#define are_equal_(...) __CMD_ASSERT_ARGS(are_equal, __VA_ARGS__)
2432#define are_not_equal_(...) __CMD_ASSERT_ARGS(are_not_equal, __VA_ARGS__)
2453#define are_not_same_(...) __CMD_ASSERT_ARGS(are_not_same, __VA_ARGS__)
2474#define are_same_(...) __CMD_ASSERT_ARGS(are_same, __VA_ARGS__)
2493#define contains_(...) __CMD_ASSERT_ARGS(contains, __VA_ARGS__)
2511#define does_not_throw_(...) __CMD_ASSERT_ARGS(does_not_throw, __VA_ARGS__)
2525#define fail_(...) __CMD_ASSERT_ARGS(fail, __VA_ARGS__)
2538#define ignore_(...) __CMD_ASSERT_ARGS(ignore, __VA_ARGS__)
2557#define is_empty_(...) __CMD_ASSERT_ARGS(is_empty, __VA_ARGS__)
2576#define is_false_(...) __CMD_ASSERT_ARGS(is_false, __VA_ARGS__)
2594#define is_greater_(...) __CMD_ASSERT_ARGS(is_greater, __VA_ARGS__)
2615#define is_greater_or_equal_(...) __CMD_ASSERT_ARGS(is_greater_or_equal, __VA_ARGS__)
2633#define is_instance_of_(type_t, ...) __CMD_ASSERT_ARGS(is_instance_of<type_t>, __VA_ARGS__)
2651#define is_less_(...) __CMD_ASSERT_ARGS(is_less, __VA_ARGS__)
2672#define is_less_or_equal_(...) __CMD_ASSERT_ARGS(is_less_or_equal, __VA_ARGS__)
2691#define is_NaN_(...) __CMD_ASSERT_ARGS(is_NaN, __VA_ARGS__)
2710#define is_negative_(...) __CMD_ASSERT_ARGS(is_negative, __VA_ARGS__)
2729#define is_not_empty_(...) __CMD_ASSERT_ARGS(is_not_empty, __VA_ARGS__)
2747#define is_not_instance_of_(type_t, ...) __CMD_ASSERT_ARGS(is_not_instance_of<type_t>, __VA_ARGS__)
2767#define is_not_null_(...) __CMD_ASSERT_ARGS(is_not_null, __VA_ARGS__)
2786#define is_not_zero_(...) __CMD_ASSERT_ARGS(is_not_zero, __VA_ARGS__)
2806#define is_null_(...) __CMD_ASSERT_ARGS(is_null, __VA_ARGS__)
2825#define is_positive_(...) __CMD_ASSERT_ARGS(is_positive, __VA_ARGS__)
2844#define is_true_(...) __CMD_ASSERT_ARGS(is_true, __VA_ARGS__)
2863#define is_zero_(...) __CMD_ASSERT_ARGS(is_zero, __VA_ARGS__)
2876#define succeed_(...) __CMD_ASSERT_ARGS(succeed, __VA_ARGS__)
2895#define throws_(exception_t, ...) __CMD_ASSERT_ARGS(throws<exception_t>, __VA_ARGS__)
2913#define throws_any_(...) __CMD_ASSERT_ARGS(throws_any, __VA_ARGS__)
Contains xtd::tunit::assert class.
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.h:37
static stack_frame empty() noexcept
Return an empty stack frame.
Exception thow when an assertion failed.
Definition assert_error.h:17
The assert class contains a collection of static methods that implement the most common assertions us...
Definition assert.h:30
static void are_equal(const expected_t &expected, const actual_t &actual, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that two type are equal.
Definition assert.h:86
static void is_null(const std::unique_ptr< pointer_t > &pointer, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is null.
Definition assert.h:1932
static void is_null(const pointer_t *pointer, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is null.
Definition assert.h:1789
static void is_not_zero(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that ta condition is not zero.
Definition assert.h:1729
static void are_equal(float expected, float actual, float tolerance)
Asserts that two type are equal.
static void is_null(const std::shared_ptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is null.
Definition assert.h:1962
static void is_greater_or_equal(const value1_t &val1, const value2_t &val2, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the first value is greater than or equal to the second value.
Definition assert.h:805
static void is_not_null(std::nullptr_t pointer, const xtd::ustring &message)
Asserts that the pointer is not null.
static void are_not_same(const expected_t &expected, const actual_t &actual)
Asserts that two objects do refer to differents objects.
Definition assert.h:340
static void is_negative(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that ta condition is negative.
Definition assert.h:1205
static void is_NaN(double value, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that a value is NaN.
static void is_null(const std::shared_ptr< pointer_t > &pointer)
Asserts that the pointer is null.
Definition assert.h:1949
static void is_null(std::nullptr_t pointer, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is null.
static void is_NaN(long double value, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that a value is NaN.
static void is_not_null(std::nullptr_t pointer, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is not null.
static void is_null(std::nullptr_t pointer, const xtd::ustring &message)
Asserts that the pointer is null.
static void are_same(const expected_t &expected, const actual_t &actual)
Asserts that two objects do refer to differents objects.
Definition assert.h:406
static void are_equal(double expected, double actual, double tolerance, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that two type are equal.
static void throws_any(const std::function< void()> &statement, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the staement does not throw an exception.
static void is_not_null(const std::unique_ptr< pointer_t > &pointer, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is not null.
Definition assert.h:1544
static void is_null(const std::unique_ptr< pointer_t > &pointer)
Asserts that the pointer is null.
Definition assert.h:1892
static void is_not_null(const std::shared_ptr< pointer_t > &pointer, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is not null.
Definition assert.h:1601
static void is_null(const std::weak_ptr< pointer_t > &pointer, const xtd::ustring &message)
Asserts that the pointer is null.
Definition assert.h:2035
static void is_instance_of(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that an object is of the type supplied or a derived type.
Definition assert.h:871
static void is_null(const std::weak_ptr< pointer_t > &pointer)
Asserts that the pointer is null.
Definition assert.h:2007
static void are_not_same(const expected_t &expected, const actual_t &actual, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that two objects do refer to differents objects.
Definition assert.h:386
static void is_greater(const value1_t &val1, const value2_t &val2, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the first value is greater than the second value.
Definition assert.h:739
static void is_not_null(const pointer_t *pointer, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is not null.
Definition assert.h:1401
static void is_less_or_equal(const value1_t &val1, const value2_t &val2, const xtd::ustring &message)
Asserts that the first value is is_less than or equal to the second value.
Definition assert.h:1005
static void is_not_zero(const value_t &value, const xtd::ustring &message)
Asserts that ta condition is not zero.
Definition assert.h:1742
static void is_empty(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that collection contains an item.
Definition assert.h:611
static void is_zero(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that ta condition is zero.
Definition assert.h:2228
static void is_not_zero(const value_t &value, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that ta condition is not zero.
Definition assert.h:1756
static void is_not_null(const std::unique_ptr< pointer_t > &pointer)
Asserts that the pointer is not null.
Definition assert.h:1504
static void is_not_null(const std::weak_ptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is not null.
Definition assert.h:1631
static void is_null(const pointer_t *pointer, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is null.
Definition assert.h:1818
static void is_null(const pointer_t *pointer, const xtd::ustring &message)
Asserts that the pointer is null.
Definition assert.h:1803
static void is_null(const std::optional< optional_t > &opt, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the optional is std::nullopt.
Definition assert.h:1875
static void is_greater_or_equal(const value1_t &val1, const value2_t &val2, const xtd::ustring &message)
Asserts that the first value is greater than or equal to the second value.
Definition assert.h:818
static void is_false(bool condition)
Asserts that ta condition is false.
static void are_not_equal(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that two type are not equal.
Definition assert.h:285
static void is_null(std::nullptr_t pointer)
Asserts that the pointer is null.
static void are_equal(float expected, float actual, float tolerance, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that two type are equal.
static void are_same(const expected_t &expected, const actual_t &actual, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that two objects do refer to differents objects.
Definition assert.h:452
static void is_less(const value1_t &val1, const value2_t &val2)
Asserts that the first value is is_less than the second value.
Definition assert.h:914
static void is_instance_of(const value_t &value, const xtd::ustring &message)
Asserts that an object is of the type supplied or a derived type.
Definition assert.h:883
static void is_greater_or_equal(const value1_t &val1, const value2_t &val2)
Asserts that the first value is greater than or equal to the second value.
Definition assert.h:792
static void is_true(bool condition, const xtd::ustring &message)
Asserts that a condition is true.
static void contains(const item_t &item, const collection_t &collection, const xtd::ustring &message)
Asserts that collection contains an item.
Definition assert.h:496
static void is_not_null(std::nullptr_t pointer, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is not null.
static void is_not_null(const pointer_t *pointer, const xtd::ustring &message)
Asserts that the pointer is not null.
Definition assert.h:1415
static void is_less_or_equal(const value1_t &val1, const value2_t &val2)
Asserts that the first value is is_less than or equal to the second value.
Definition assert.h:979
static void does_not_throw(const std::function< void()> &statement, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the staement does not throw an exception.
static void is_zero(const value_t &value, const xtd::ustring &message)
Asserts that ta condition is zero.
Definition assert.h:2241
static void are_equal(float expected, float actual, float tolerance, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that two type are equal.
static void is_less(const value1_t &val1, const value2_t &val2, const xtd::ustring &message)
Asserts that the first value is is_less than the second value.
Definition assert.h:938
static void is_greater(const value1_t &val1, const value2_t &val2, const xtd::ustring &message)
Asserts that the first value is greater than the second value.
Definition assert.h:751
static void is_empty(const value_t &value, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that collection contains an item.
Definition assert.h:638
static void is_null(const std::optional< optional_t > &opt, const xtd::ustring &message)
Asserts that the optional is std::nullopt.
Definition assert.h:1861
static void is_not_instance_of(const value_t &value)
Asserts that an object is not of the type supplied or a derived type.
Definition assert.h:1330
static void is_instance_of(const value_t &value)
Asserts that an object is of the type supplied or a derived type.
Definition assert.h:859
static void is_empty(const value_t &value, const xtd::ustring &message)
Asserts that collection contains an item.
Definition assert.h:624
static void is_true(bool condition, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that a condition is true.
static void are_equal(long double expected, long double actual, long double tolerance)
Asserts that two type are equal.
static void is_not_null(const std::optional< optional_t > &opt)
Asserts that the optional is not std::nullopt.
Definition assert.h:1447
static void is_less(const value1_t &val1, const value2_t &val2, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the first value is is_less than the second value.
Definition assert.h:951
static void is_NaN(double value)
that a value is NaN.
static void is_not_null(const std::shared_ptr< pointer_t > &pointer, const xtd::ustring &message)
Asserts that the pointer is not null.
Definition assert.h:1587
static void is_NaN(long double value, const xtd::diagnostics::stack_frame &stack_frame)
that a value is NaN.
static void is_less_or_equal(const value1_t &val1, const value2_t &val2, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the first value is is_less than or equal to the second value.
Definition assert.h:1019
static void are_equal(double expected, double actual, double tolerance, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that two type are equal.
static void is_positive(const value_t &value, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that ta condition is positive.
Definition assert.h:2148
static void is_not_null(const std::unique_ptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is not null.
Definition assert.h:1517
static void does_not_throw(const std::function< void()> &statement, const xtd::ustring &message)
Asserts that the staement does not throw an exception.
static void are_equal(const expected_t &expected, const actual_t &actual, const xtd::ustring &message)
Asserts that two type are equal.
Definition assert.h:73
static void is_not_null(std::nullptr_t pointer)
Asserts that the pointer is not null.
static void are_equal(long double expected, long double actual, long double tolerance, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that two type are equal.
static void is_not_null(const std::unique_ptr< pointer_t > &pointer, const xtd::ustring &message)
Asserts that the pointer is not null.
Definition assert.h:1530
static void is_not_zero(const value_t &value)
Asserts that ta condition is not zero.
Definition assert.h:1716
static void is_false(bool condition, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that a condition is false.
static void contains(const item_t &item, const collection_t &collection, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that collection contains an item.
Definition assert.h:510
static void are_equal(long double expected, long double actual, long double tolerance, const xtd::ustring &message)
Asserts that two type are equal.
static void are_equal(float expected, float &actual, float tolerance, const xtd::ustring &message)
Asserts that two type are equal.
static void is_zero(const value_t &value, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that ta condition is zero.
Definition assert.h:2255
static void is_positive(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that ta condition is positive.
Definition assert.h:2121
static void does_not_throw(const std::function< void()> &statement, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the staement does not throw an exception.
static void is_true(bool condition, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that a condition is true.
static void throws_any(const std::function< void()> &statement)
Asserts that the staement does not throw an exception.
static void is_NaN(float value, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that a value is NaN.
static void are_equal(long double expected, long double actual, long double tolerance, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that two type are equal.
static void is_negative(const value_t &value)
Asserts that ta condition is negative.
Definition assert.h:1192
static void is_positive(const value_t &value, const xtd::ustring &message)
Asserts that ta condition is positive.
Definition assert.h:2134
static void is_false(bool condition, const xtd::ustring &message)
Asserts that a condition is false.
static void is_negative(const value_t &value, const xtd::ustring &message)
Asserts that ta condition is negative.
Definition assert.h:1218
static void is_empty(const value_t &value)
Asserts that collection contains an item.
Definition assert.h:598
static void is_not_empty(const value_t &value, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that collection does not contain any item.
Definition assert.h:1290
static void is_null(const std::shared_ptr< pointer_t > &pointer, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is null.
Definition assert.h:1989
static void is_null(const std::weak_ptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is null.
Definition assert.h:2021
static void is_less_or_equal(const value1_t &val1, const value2_t &val2, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the first value is is_less than or equal to the second value.
Definition assert.h:992
static void is_null(const std::unique_ptr< pointer_t > &pointer, const xtd::ustring &message)
Asserts that the pointer is null.
Definition assert.h:1918
static void are_not_same(const expected_t &expected, const actual_t &actual, const xtd::ustring &message)
Asserts that two objects do refer to differents objects.
Definition assert.h:370
static void is_NaN(float value, const xtd::diagnostics::stack_frame &stack_frame)
that a value is NaN.
static void is_true(bool condition)
Asserts that ta condition is true.
static void is_NaN(long double value)
that a value is NaN.
static void is_NaN(double value, const xtd::ustring &message)
Asserts that a value is NaN.
static void is_not_empty(const value_t &value, const xtd::ustring &message)
Asserts that collection does not contain any item.
Definition assert.h:1276
static void is_not_empty(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that collection does not contain any item.
Definition assert.h:1263
static void does_not_throw(const std::function< void()> &statement)
Asserts that the staement does not throw an exception.
static void is_not_null(const std::shared_ptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is not null.
Definition assert.h:1574
static void is_greater(const value1_t &val1, const value2_t &val2, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the first value is greater than the second value.
Definition assert.h:764
static void is_NaN(float value, const xtd::ustring &message)
Asserts that a value is NaN.
static void is_null(const std::unique_ptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is null.
Definition assert.h:1905
static void is_not_null(const std::weak_ptr< pointer_t > &pointer, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is not null.
Definition assert.h:1658
static void is_not_empty(const value_t &value)
Asserts that collection oes not contain any item.
Definition assert.h:1250
static void contains(const item_t &item, const collection_t &collection, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that collection contains an item.
Definition assert.h:483
static void are_equal(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that two type are equal.
Definition assert.h:61
static void is_not_null(const std::optional< optional_t > &opt, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the optional is not std::nullopt.
Definition assert.h:1487
static void is_not_null(const pointer_t *pointer)
Asserts that the pointer is not null.
Definition assert.h:1387
static void is_null(const std::weak_ptr< pointer_t > &pointer, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is null.
Definition assert.h:2050
static void is_negative(const value_t &value, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that ta condition is negative.
Definition assert.h:1232
static void is_positive(const value_t &value)
Asserts that ta condition is positive.
Definition assert.h:2108
static void is_less(const value1_t &val1, const value2_t &val2, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the first value is is_less than the second value.
Definition assert.h:926
static void throws_any(const std::function< void()> &statement, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the staement does not throw an exception.
static void is_not_instance_of(const value_t &value, const xtd::ustring &message)
Asserts that an object is not of the type supplied or a derived type.
Definition assert.h:1354
static void is_null(const pointer_t *pointer)
Asserts that the pointer is null.
Definition assert.h:1775
static void is_greater(const value1_t &val1, const value2_t &val2)
Asserts that the first value is greater than the second value.
Definition assert.h:727
static void is_zero(const value_t &value)
Asserts that ta condition is zero.
Definition assert.h:2215
static void is_not_null(const std::weak_ptr< pointer_t > &pointer)
Asserts that the pointer is not null.
Definition assert.h:1618
static void is_null(const std::optional< optional_t > &opt, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the optional is std::nullopt.
Definition assert.h:1848
static void are_equal(double expected, double actual, double tolerance)
Asserts that two type are equal.
static void is_not_instance_of(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that an object is not of the type supplied or a derived type.
Definition assert.h:1342
static void is_null(const std::shared_ptr< pointer_t > &pointer, const xtd::ustring &message)
Asserts that the pointer is null.
Definition assert.h:1975
static void are_equal(const expected_t &expected, const actual_t &actual)
Asserts that two type are equal.
Definition assert.h:49
static void are_not_equal(const expected_t &expected, const actual_t &actual)
Asserts that two type are not equal.
Definition assert.h:273
static void are_same(const expected_t &expected, const actual_t &actual, const xtd::ustring &message)
Asserts that two objects do refer to differents objects.
Definition assert.h:436
static void is_not_null(const std::shared_ptr< pointer_t > &pointer)
Asserts that the pointer is not null.
Definition assert.h:1561
static void is_null(const std::optional< optional_t > &opt)
Asserts that the optional is std::nullopt.
Definition assert.h:1835
static void are_not_equal(const expected_t &expected, const actual_t &actual, const xtd::ustring &message)
Asserts that two type are not equal.
Definition assert.h:297
static void is_not_null(const std::optional< optional_t > &opt, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the optional is not std::nullopt.
Definition assert.h:1460
static void is_not_null(const pointer_t *pointer, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is not null.
Definition assert.h:1430
static void are_not_equal(const expected_t &expected, const actual_t &actual, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that two type are not equal.
Definition assert.h:310
static void is_NaN(float value)
that a value is NaN.
static void is_false(bool condition, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that a condition is false.
static void is_NaN(long double value, const xtd::ustring &message)
Asserts that a value is NaN.
static void are_not_same(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that two objects do refer to differents objects.
Definition assert.h:355
static void is_not_instance_of(const value_t &value, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that an object is not of the type supplied or a derived type.
Definition assert.h:1367
static void is_NaN(double value, const xtd::diagnostics::stack_frame &stack_frame)
that a value is NaN.
static void throws_any(const std::function< void()> &statement, const xtd::ustring &message)
Asserts that the staement does not throw an exception.
static void are_same(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that two objects do refer to differents objects.
Definition assert.h:421
static void are_equal(double expected, double actual, double tolerance, const xtd::ustring &message)
Asserts that two type are equal.
static void is_instance_of(const value_t &value, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that an object is of the type supplied or a derived type.
Definition assert.h:896
static void is_null(std::nullptr_t pointer, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is null.
static void contains(const item_t &item, const collection_t &collection)
Asserts that collection contains an item.
Definition assert.h:470
static void is_not_null(const std::weak_ptr< pointer_t > &pointer, const xtd::ustring &message)
Asserts that the pointer is not null.
Definition assert.h:1644
static void is_not_null(const std::optional< optional_t > &opt, const xtd::ustring &message)
Asserts that the optional is not std::nullopt.
Definition assert.h:1473
static void is_greater_or_equal(const value1_t &val1, const value2_t &val2, const xtd::ustring &message, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the first value is greater than or equal to the second value.
Definition assert.h:832
The base class for assert.
Definition base_assert.h:29
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
#define tunit_export_
Define shared library export.
Definition tunit_export.h:13
#define typeof_
Used to obtain the type object of a specified type or object.
Definition typeof.h:45
char8_t char8
Represents a 8-bit unicode character.
Definition types.h:64
char16_t char16
Represents a 16-bit unicode character.
Definition types.h:76
char32_t char32
Represents a 32-bit unicode character.
Definition types.h:87
std::string to_string(const date_time &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition date_time.h:1080
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10