54 template<
typename expected_t,
typename actual_t>
66 template<
typename expected_t,
typename actual_t>
78 template<
typename expected_t,
typename actual_t>
91 template<
typename expected_t,
typename actual_t>
93 if (actual == expected)
94 succeed(message, stack_frame);
101 #if defined(__cpp_lib_char8_t) 123 static void are_equal(
float expected,
float actual,
float tolerance);
149 static void are_equal(
float expected,
float& actual,
float tolerance,
const xtd::ustring& message);
175 static void are_equal(
double expected,
double actual,
double tolerance);
201 static void are_equal(
double expected,
double actual,
double tolerance,
const xtd::ustring& message);
227 static void are_equal(
long double expected,
long double actual,
long double tolerance);
253 static void are_equal(
long double expected,
long double actual,
long double tolerance,
const xtd::ustring& message);
278 template<
typename expected_t,
typename actual_t>
290 template<
typename expected_t,
typename actual_t>
302 template<
typename expected_t,
typename actual_t>
315 template<
typename expected_t,
typename actual_t>
317 if (actual != expected)
318 succeed(message, stack_frame);
325 #if defined(__cpp_lib_char8_t) 345 template<
typename expected_t,
typename actual_t>
360 template<
typename expected_t,
typename actual_t>
375 template<
typename expected_t,
typename actual_t>
391 template<
typename expected_t,
typename actual_t>
393 if (&actual != &expected)
394 succeed(message, stack_frame);
411 template<
typename expected_t,
typename actual_t>
426 template<
typename expected_t,
typename actual_t>
441 template<
typename expected_t,
typename actual_t>
457 template<
typename expected_t,
typename actual_t>
459 if (&actual == &expected)
460 succeed(message, stack_frame);
475 template<
typename item_t,
typename collection_t>
488 template<
typename item_t,
typename collection_t>
501 template<
typename item_t,
typename collection_t>
515 template<
typename item_t,
typename collection_t>
517 auto result = std::find(collection.begin(), collection.end(), item);
518 if (result != collection.end())
519 succeed(message, stack_frame);
521 fail(
"collection containing " +
to_string(item), join_items(collection), message, stack_frame);
525 template<
typename item_t,
typename value_t>
527 template<
typename item_t,
typename value_t>
528 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);}
529 template<
typename item_t,
typename value_t>
531 template<
typename item_t,
typename value_t>
533 auto result = std::find(values.begin(), values.end(), item);
534 if (result != values.end())
535 succeed(message, stack_frame);
537 fail(
"collection containing " +
to_string(item), join_items(values), message, stack_frame);
540 #if defined(__cpp_lib_char8_t) 557 static void does_not_throw(
const std::function<
void()>& statement);
579 static void does_not_throw(
const std::function<
void()>& statement,
const xtd::ustring& message);
603 template<
typename value_t>
616 template<
typename value_t>
629 template<
typename value_t>
643 template<
typename value_t>
645 if (std::empty(value))
646 succeed(message, stack_frame);
648 fail(
"collection <empty>", join_items(value), message, stack_frame);
652 template<
typename value_t>
654 template<
typename value_t>
655 static void is_empty(
const std::initializer_list<value_t>& value,
const xtd::diagnostics::stack_frame& stack_frame) {is_empty(value,
"", stack_frame);}
656 template<
typename value_t>
658 template<
typename value_t>
660 if (std::empty(values))
661 succeed(message, stack_frame);
663 fail(
"collection <empty>", join_items(values), message, stack_frame);
666 #if defined(__cpp_lib_char8_t) 684 static void is_false(
bool condition);
708 static void is_false(
bool condition,
const xtd::ustring& message);
732 template<
typename value1_t,
typename value2_t>
744 template<
typename value1_t,
typename value2_t>
756 template<
typename value1_t,
typename value2_t>
769 template<
typename value1_t,
typename value2_t>
772 succeed(message, stack_frame);
779 #if defined(__cpp_lib_char8_t) 797 template<
typename value1_t,
typename value2_t>
810 template<
typename value1_t,
typename value2_t>
823 template<
typename value1_t,
typename value2_t>
837 template<
typename value1_t,
typename value2_t>
840 succeed(message, stack_frame);
842 fail(
"greater than or equal to " +
to_string(val2),
to_string(val1), message, stack_frame);
847 #if defined(__cpp_lib_char8_t) 864 template<
typename type_t,
typename value_t>
876 template<
typename type_t,
typename value_t>
888 template<
typename type_t,
typename value_t>
901 template<
typename type_t,
typename value_t>
903 const type_t* instance =
dynamic_cast<const type_t*
>(&value);
904 if (instance !=
nullptr)
905 succeed(message, stack_frame);
907 fail(
"instance of <" + typeof_<type_t>().full_name() +
">",
"<" +
typeof_(value).full_name() +
">", message, stack_frame);
919 template<
typename value1_t,
typename value2_t>
931 template<
typename value1_t,
typename value2_t>
943 template<
typename value1_t,
typename value2_t>
956 template<
typename value1_t,
typename value2_t>
959 succeed(message, stack_frame);
966 #if defined(__cpp_lib_char8_t) 984 template<
typename value1_t,
typename value2_t>
997 template<
typename value1_t,
typename value2_t>
1010 template<
typename value1_t,
typename value2_t>
1024 template<
typename value1_t,
typename value2_t>
1027 succeed(message, stack_frame);
1029 fail(
"less than or equal to " +
to_string(val2),
to_string(val1), message, stack_frame);
1034 #if defined(__cpp_lib_char8_t) 1052 static void is_NaN(
double value);
1076 static void is_NaN(
double value,
const xtd::ustring& message);
1100 static void is_NaN(
long double value);
1124 static void is_NaN(
long double value,
const xtd::ustring& message);
1148 static void is_NaN(
float value);
1172 static void is_NaN(
float value,
const xtd::ustring& message);
1197 template<
typename value_t>
1210 template<
typename value_t>
1223 template<
typename value_t>
1237 template<
typename value_t>
1240 succeed(message, stack_frame);
1242 fail(
"negative",
to_string(value), message, stack_frame);
1255 template<
typename value_t>
1268 template<
typename value_t>
1281 template<
typename value_t>
1295 template<
typename value_t>
1297 if (!std::empty(value))
1298 succeed(message, stack_frame);
1300 fail(
"collection not <empty>",
"<empty>", message, stack_frame);
1304 template<
typename value_t>
1306 template<
typename value_t>
1307 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);}
1308 template<
typename value_t>
1310 template<
typename value_t>
1312 if (!std::empty(value))
1313 succeed(message, stack_frame);
1315 fail(
"collection not <empty>",
"<empty>", message, stack_frame);
1318 #if defined(__cpp_lib_char8_t) 1335 template<
typename type_t,
typename value_t>
1347 template<
typename type_t,
typename value_t>
1359 template<
typename type_t,
typename value_t>
1372 template<
typename type_t,
typename value_t>
1374 const type_t* instance =
dynamic_cast<const type_t*
>(&value);
1375 if (instance ==
nullptr)
1376 succeed(message, stack_frame);
1378 fail(
"not instance of <" + typeof_<type_t>().full_name() +
">",
"<" +
typeof_(value).full_name() +
">", message, stack_frame);
1392 template<
typename po
inter_t>
1406 template<
typename po
inter_t>
1420 template<
typename po
inter_t>
1435 template<
typename po
inter_t>
1437 if (pointer !=
nullptr)
1438 succeed(message, stack_frame);
1440 fail(
"not null",
"null", message, stack_frame);
1452 template<
typename optional_t>
1465 template<
typename optional_t>
1478 template<
typename optional_t>
1492 template<
typename optional_t>
1494 if (opt != std::nullopt)
1495 succeed(message, stack_frame);
1497 fail(
"not null",
"null", message, stack_frame);
1509 template<
typename po
inter_t>
1522 template<
typename po
inter_t>
1535 template<
typename po
inter_t>
1549 template<
typename po
inter_t>
1551 if (pointer !=
nullptr)
1552 succeed(message, stack_frame);
1554 fail(
"not null",
"null", message, stack_frame);
1566 template<
typename po
inter_t>
1579 template<
typename po
inter_t>
1592 template<
typename po
inter_t>
1606 template<
typename po
inter_t>
1608 if (pointer !=
nullptr)
1609 succeed(message, stack_frame);
1611 fail(
"not null",
"null", message, stack_frame);
1623 template<
typename po
inter_t>
1636 template<
typename po
inter_t>
1649 template<
typename po
inter_t>
1663 template<
typename po
inter_t>
1665 if (pointer.owner_before(std::weak_ptr<pointer_t> {}) || std::weak_ptr<pointer_t> {}.owner_before(pointer))
1666 succeed(message, stack_frame);
1668 fail(
"not null",
"null", message, stack_frame);
1678 static void is_not_null(std::nullptr_t pointer);
1698 static void is_not_null(std::nullptr_t pointer,
const xtd::ustring& message);
1721 template<
typename value_t>
1734 template<
typename value_t>
1747 template<
typename value_t>
1761 template<
typename value_t>
1764 succeed(message, stack_frame);
1766 fail(
"not zero",
"0", message, stack_frame);
1780 template<
typename po
inter_t>
1794 template<
typename po
inter_t>
1808 template<
typename po
inter_t>
1823 template<
typename po
inter_t>
1825 if (pointer ==
nullptr)
1826 succeed(message, stack_frame);
1828 fail(
"null",
"not null", message, stack_frame);
1840 template<
typename optional_t>
1853 template<
typename optional_t>
1866 template<
typename optional_t>
1880 template<
typename optional_t>
1882 if (opt == std::nullopt)
1883 succeed(message, stack_frame);
1885 fail(
"null",
"not null", message, stack_frame);
1897 template<
typename po
inter_t>
1910 template<
typename po
inter_t>
1923 template<
typename po
inter_t>
1937 template<
typename po
inter_t>
1939 if (pointer ==
nullptr)
1940 succeed(message, stack_frame);
1942 fail(
"null",
"not null", message, stack_frame);
1954 template<
typename po
inter_t>
1967 template<
typename po
inter_t>
1980 template<
typename po
inter_t>
1994 template<
typename po
inter_t>
1996 if (pointer ==
nullptr)
1997 succeed(message, stack_frame);
1999 fail(
"null",
"not null", message, stack_frame);
2012 template<
typename po
inter_t>
2026 template<
typename po
inter_t>
2040 template<
typename po
inter_t>
2055 template<
typename po
inter_t>
2057 if (!pointer.owner_before(std::weak_ptr<pointer_t> {}) && !std::weak_ptr<pointer_t> {}.owner_before(pointer))
2058 succeed(message, stack_frame);
2060 fail(
"null",
"not null", message, stack_frame);
2070 static void is_null(std::nullptr_t pointer);
2090 static void is_null(std::nullptr_t pointer,
const xtd::ustring& message);
2113 template<
typename value_t>
2126 template<
typename value_t>
2139 template<
typename value_t>
2153 template<
typename value_t>
2156 succeed(message, stack_frame);
2158 fail(
"positive",
to_string(value), message, stack_frame);
2171 static void is_true(
bool condition);
2195 static void is_true(
bool condition,
const xtd::ustring& message);
2220 template<
typename value_t>
2233 template<
typename value_t>
2246 template<
typename value_t>
2260 template<
typename value_t>
2262 if (value == static_cast<value_t>(0))
2263 succeed(message, stack_frame);
2265 fail(
"zero",
to_string(value), message, stack_frame);
2278 template<
typename exception_t>
2291 template<
typename exception_t>
2304 template<
typename exception_t>
2318 template<
typename exception_t>
2322 fail(
"<" + typeof_<exception_t>().full_name() +
">",
"<nothing>", message, stack_frame);
2323 }
catch (
const exception_t&) {
2324 succeed(message, stack_frame);
2327 }
catch (
const std::exception&
e) {
2328 fail(
"<" + typeof_<exception_t>().full_name() +
">",
"<" +
typeof_(e).full_name() +
">", message, stack_frame);
2330 fail(
"<" + typeof_<exception_t>().full_name() +
">",
"<exception>", message, stack_frame);
2343 static void throws_any(
const std::function<
void()>& statement);
2365 static void throws_any(
const std::function<
void()>& statement,
const xtd::ustring& message);
2386 #define __CMD_ASSERT_0_ARGS__(cmd) cmd(csf_) 2387 #define __CMD_ASSERT_1_ARGS__(cmd, arg1) cmd(arg1, csf_) 2388 #define __CMD_ASSERT_2_ARGS__(cmd, arg1, arg2) cmd(arg1, arg2, csf_) 2389 #define __CMD_ASSERT_3_ARGS__(cmd, arg1, arg2, arg3) cmd(arg1, arg2, arg3, csf_) 2390 #define __CMD_ASSERT_4_ARGS__(cmd, arg1, arg2, arg3, arg4) cmd(arg1, arg2, arg3, arg4, csf_) 2391 #define __CMD_ASSERT_5_ARGS__(cmd, arg1, arg2, arg3, arg4) cmd(arg1, arg2, arg3, arg4, arg5, csf_) 2392 #define __GET_LAST_ARG(arg1, arg2, arg3, arg4, arg5, arg6, ...) arg6 2393 #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__, ) 2394 #define __CMD_ASSERT_ARGS(cmd, ...) __CMD_ASSERT_MACRO_CHOOSER(cmd, __VA_ARGS__)(cmd, __VA_ARGS__) 2408 #define abort_() abort(csf_) 2423 #define are_equal_(...) __CMD_ASSERT_ARGS(are_equal, __VA_ARGS__) 2438 #define are_not_equal_(...) __CMD_ASSERT_ARGS(are_not_equal, __VA_ARGS__) 2459 #define are_not_same_(...) __CMD_ASSERT_ARGS(are_not_same, __VA_ARGS__) 2480 #define are_same_(...) __CMD_ASSERT_ARGS(are_same, __VA_ARGS__) 2499 #define contains_(...) __CMD_ASSERT_ARGS(contains, __VA_ARGS__) 2517 #define does_not_throw_(...) __CMD_ASSERT_ARGS(does_not_throw, __VA_ARGS__) 2531 #define fail_(...) __CMD_ASSERT_ARGS(fail, __VA_ARGS__) 2544 #define ignore_(...) __CMD_ASSERT_ARGS(ignore, __VA_ARGS__) 2563 #define is_empty_(...) __CMD_ASSERT_ARGS(is_empty, __VA_ARGS__) 2582 #define is_false_(...) __CMD_ASSERT_ARGS(is_false, __VA_ARGS__) 2600 #define is_greater_(...) __CMD_ASSERT_ARGS(is_greater, __VA_ARGS__) 2621 #define is_greater_or_equal_(...) __CMD_ASSERT_ARGS(is_greater_or_equal, __VA_ARGS__) 2639 #define is_instance_of_(type_t, ...) __CMD_ASSERT_ARGS(is_instance_of<type_t>, __VA_ARGS__) 2657 #define is_less_(...) __CMD_ASSERT_ARGS(is_less, __VA_ARGS__) 2678 #define is_less_or_equal_(...) __CMD_ASSERT_ARGS(is_less_or_equal, __VA_ARGS__) 2697 #define is_NaN_(...) __CMD_ASSERT_ARGS(is_NaN, __VA_ARGS__) 2716 #define is_negative_(...) __CMD_ASSERT_ARGS(is_negative, __VA_ARGS__) 2735 #define is_not_empty_(...) __CMD_ASSERT_ARGS(is_not_empty, __VA_ARGS__) 2753 #define is_not_instance_of_(type_t, ...) __CMD_ASSERT_ARGS(is_not_instance_of<type_t>, __VA_ARGS__) 2773 #define is_not_null_(...) __CMD_ASSERT_ARGS(is_not_null, __VA_ARGS__) 2792 #define is_not_zero_(...) __CMD_ASSERT_ARGS(is_not_zero, __VA_ARGS__) 2812 #define is_null_(...) __CMD_ASSERT_ARGS(is_null, __VA_ARGS__) 2831 #define is_positive_(...) __CMD_ASSERT_ARGS(is_positive, __VA_ARGS__) 2850 #define is_true_(...) __CMD_ASSERT_ARGS(is_true, __VA_ARGS__) 2869 #define is_zero_(...) __CMD_ASSERT_ARGS(is_zero, __VA_ARGS__) 2882 #define succeed_(...) __CMD_ASSERT_ARGS(succeed, __VA_ARGS__) 2901 #define throws_(exception_t, ...) __CMD_ASSERT_ARGS(throws<exception_t>, __VA_ARGS__) 2919 #define throws_any_(...) __CMD_ASSERT_ARGS(throws_any, __VA_ARGS__) 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:920
static void is_zero(const value_t &value)
Asserts that ta condition is zero.
Definition: assert.h:2221
The base class for assert.
Definition: base_assert.h:29
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:1968
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:877
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:1011
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:998
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:932
static void is_not_zero(const value_t &value, const xtd::ustring &message)
Asserts that ta condition is not zero.
Definition: assert.h:1748
static void is_null(const pointer_t *pointer)
Asserts that the pointer is null.
Definition: assert.h:1781
Exception thow when an assertion failed.
Definition: assert_error.h:17
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:489
static void is_not_null(const std::weak_ptr< pointer_t > &pointer)
Asserts that the pointer is not null.
Definition: assert.h:1624
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:1593
The assert class contains a collection of static methods that implement the most common assertions us...
Definition: assert.h:36
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:67
static void is_negative(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that ta condition is negative.
Definition: assert.h:1211
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:1523
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:392
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:1607
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:2056
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:291
static void is_empty(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that collection contains an item.
Definition: assert.h:617
static void is_null(const std::shared_ptr< pointer_t > &pointer, const xtd::ustring &message)
Asserts that the pointer is null.
Definition: assert.h:1981
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:458
static void are_not_equal(const expected_t &expected, const actual_t &actual)
Asserts that two type are not equal.
Definition: assert.h:279
static void is_positive(const value_t &value)
Asserts that ta condition is positive.
Definition: assert.h:2114
static void are_same(const expected_t &expected, const actual_t &actual)
Asserts that two objects do refer to differents objects.
Definition: assert.h:412
static void is_not_empty(const value_t &value)
Asserts that collection oes not contain any item.
Definition: assert.h:1256
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:1735
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:1580
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
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:361
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:1938
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:303
static void is_not_null(const pointer_t *pointer, const xtd::ustring &message)
Asserts that the pointer is not null.
Definition: assert.h:1421
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:902
static void is_null(const std::shared_ptr< pointer_t > &pointer)
Asserts that the pointer is null.
Definition: assert.h:1955
static void is_not_null(const std::unique_ptr< pointer_t > &pointer)
Asserts that the pointer is not null.
Definition: assert.h:1510
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:745
static void is_zero(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that ta condition is zero.
Definition: assert.h:2234
static void contains(const item_t &item, const collection_t &collection, const xtd::ustring &message)
Asserts that collection contains an item.
Definition: assert.h:502
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:346
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
static void is_not_null(const std::shared_ptr< pointer_t > &pointer)
Asserts that the pointer is not null.
Definition: assert.h:1567
static void is_null(const std::unique_ptr< pointer_t > &pointer)
Asserts that the pointer is null.
Definition: assert.h:1898
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:1063
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:1650
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:1336
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:1269
static void is_zero(const value_t &value, const xtd::ustring &message)
Asserts that ta condition is zero.
Definition: assert.h:2247
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:316
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:957
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:427
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:1025
static void is_null(const std::optional< optional_t > &opt, const xtd::ustring &message)
Asserts that the optional is std::nullopt.
Definition: assert.h:1867
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:376
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:1637
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:1466
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:733
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:811
static void is_null(const std::unique_ptr< pointer_t > &pointer, const xtd::ustring &message)
Asserts that the pointer is null.
Definition: assert.h:1924
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:1407
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:1536
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:516
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:838
#define typeof_
Used to obtain the type string for a type. A typeof_ expression takes the following form: ...
Definition: typeof.h:42
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:1436
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:2027
static void is_empty(const value_t &value)
Asserts that collection contains an item.
Definition: assert.h:604
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:944
static void is_not_null(const std::optional< optional_t > &opt)
Asserts that the optional is not std::nullopt.
Definition: assert.h:1453
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:1881
static void contains(const item_t &item, const collection_t &collection)
Asserts that collection contains an item.
Definition: assert.h:476
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:1348
static void is_not_empty(const value_t &value, const xtd::ustring &message)
Asserts that collection does not contain any item.
Definition: assert.h:1282
static void is_null(const pointer_t *pointer, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that the pointer is null.
Definition: assert.h:1795
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition: stack_frame.h:37
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:824
static void is_not_null(const pointer_t *pointer)
Asserts that the pointer is not null.
Definition: assert.h:1393
static stack_frame empty() noexcept
Return an empty stack frame.
static void is_null(const std::weak_ptr< pointer_t > &pointer)
Asserts that the pointer is null.
Definition: assert.h:2013
static void is_positive(const value_t &value, const xtd::ustring &message)
Asserts that ta condition is positive.
Definition: assert.h:2140
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:1762
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:1911
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:1550
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:1854
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:1995
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:644
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:92
static void is_null(const std::optional< optional_t > &opt)
Asserts that the optional is std::nullopt.
Definition: assert.h:1841
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:1373
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:1238
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:2154
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:1479
char32_t char32
Represents a 32-bit unicode character.
Definition: types.h:85
static void is_negative(const value_t &value, const xtd::ustring &message)
Asserts that ta condition is negative.
Definition: assert.h:1224
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:865
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:1296
static void is_null(const std::weak_ptr< pointer_t > &pointer, const xtd::ustring &message)
Asserts that the pointer is null.
Definition: assert.h:2041
static void is_negative(const value_t &value)
Asserts that ta condition is negative.
Definition: assert.h:1198
static void is_positive(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame)
Asserts that ta condition is positive.
Definition: assert.h:2127
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:79
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:770
static void is_null(const pointer_t *pointer, const xtd::ustring &message)
Asserts that the pointer is null.
Definition: assert.h:1809
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:1360
static void is_not_zero(const value_t &value)
Asserts that ta condition is not zero.
Definition: assert.h:1722
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:757
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:1824
char8_t char8
Represents a 8-bit unicode character.
Definition: types.h:62
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:1493
char16_t char16
Represents a 16-bit unicode character.
Definition: types.h:74
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:1664
static void is_empty(const value_t &value, const xtd::ustring &message)
Asserts that collection contains an item.
Definition: assert.h:630
Contains xtd::tunit::assert class.
static void are_equal(const expected_t &expected, const actual_t &actual)
Asserts that two type are equal.
Definition: assert.h:55
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:985
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:798
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:442
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:889
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:2261