50 template<
typename expected_t,
typename actual_t>
63 template<
typename expected_t,
typename actual_t>
171 template<
typename expected_t,
typename actual_t>
184 template<
typename expected_t,
typename actual_t>
186 if (!
equals(expected, actual))
succeed(message, stack_frame);
211 template<
typename expected_t,
typename actual_t>
227 template<
typename expected_t,
typename actual_t>
229 if (!
equals(&expected, &actual))
succeed(message, stack_frame);
246 template<
typename expected_t,
typename actual_t>
262 template<
typename expected_t,
typename actual_t>
264 if (
equals(&expected, &actual))
succeed(message, stack_frame);
279 template<
typename item_t,
typename collection_t>
293 template<
typename item_t,
typename collection_t>
295 auto result = std::find(collection.begin(), collection.end(), item);
296 if (result != collection.end())
succeed(message, stack_frame);
301 template<
typename item_t,
typename value_t>
303 template<
typename item_t,
typename value_t>
305 auto result = std::find(values.begin(), values.end(), item);
306 if (result != values.end()) succeed(message, stack_frame);
307 else fail(
"collection containing " +
to_string(item), join_items(values), message, stack_frame);
351 template<
typename value_t>
365 template<
typename value_t>
367 if (empty(value))
succeed(message, stack_frame);
368 else fail(
"collection <empty>",
join_items(value), message, stack_frame);
372 template<
typename value_t>
374 template<
typename value_t>
376 if (empty(values)) succeed(message, stack_frame);
377 else fail(
"collection <empty>", join_items(values), message, stack_frame);
422 template<
typename value1_t,
typename value2_t>
435 template<
typename value1_t,
typename value2_t>
437 if (val1 > val2)
succeed(message, stack_frame);
460 template<
typename value1_t,
typename value2_t>
474 template<
typename value1_t,
typename value2_t>
476 if (val1 >= val2)
succeed(message, stack_frame);
498 template<
typename type_t,
typename value_t>
511 template<
typename type_t,
typename value_t>
513 const type_t* instance =
dynamic_cast<const type_t*
>(&value);
514 if (instance !=
nullptr)
succeed(message, stack_frame);
515 else fail(
"instance of <" +
typeof_<type_t>().full_name() +
">",
"<" +
typeof_(value).full_name() +
">", message, stack_frame);
528 template<
typename value1_t,
typename value2_t>
541 template<
typename value1_t,
typename value2_t>
543 if (val1 < val2)
succeed(message, stack_frame);
566 template<
typename value1_t,
typename value2_t>
580 template<
typename value1_t,
typename value2_t>
582 if (val1 <= val2)
succeed(message, stack_frame);
681 template<
typename value_t>
695 template<
typename value_t>
697 if (value < 0)
succeed(message, stack_frame);
698 else fail(
"negative",
to_string(value), message, stack_frame);
712 template<
typename value_t>
726 template<
typename value_t>
728 if (!empty(value))
succeed(message, stack_frame);
729 else fail(
"collection not <empty>",
"<empty>", message, stack_frame);
733 template<
typename value_t>
735 template<
typename value_t>
737 if (!empty(values)) succeed(message, stack_frame);
738 else fail(
"collection not <empty>",
"<empty>", message, stack_frame);
757 template<
typename type_t,
typename value_t>
770 template<
typename type_t,
typename value_t>
772 const type_t* instance =
dynamic_cast<const type_t*
>(&value);
773 if (instance ==
nullptr)
succeed(message, stack_frame);
774 else fail(
"not instance of <" +
typeof_<type_t>().full_name() +
">",
"<" +
typeof_(value).full_name() +
">", message, stack_frame);
789 template<
typename po
inter_t>
804 template<
typename po
inter_t>
807 else fail(
"not null",
"null", message, stack_frame);
820 template<
typename optional_t>
834 template<
typename optional_t>
836 if (opt != std::nullopt)
succeed(message, stack_frame);
837 else fail(
"not null",
"null", message, stack_frame);
850 template<
typename po
inter_t>
864 template<
typename po
inter_t>
867 else fail(
"not null",
"null", message, stack_frame);
880 template<
typename po
inter_t>
894 template<
typename po
inter_t>
897 else fail(
"not null",
"null", message, stack_frame);
910 template<
typename po
inter_t>
924 template<
typename po
inter_t>
927 else fail(
"not null",
"null", message, stack_frame);
962 template<
typename value_t>
976 template<
typename value_t>
978 if (value !=
static_cast<value_t
>(0))
succeed(message, stack_frame);
979 else fail(
"not zero",
"0", message, stack_frame);
994 template<
typename po
inter_t>
1009 template<
typename po
inter_t>
1012 else fail(
"null",
"not null", message, stack_frame);
1025 template<
typename optional_t>
1039 template<
typename optional_t>
1041 if (opt == std::nullopt)
succeed(message, stack_frame);
1042 else fail(
"null",
"not null", message, stack_frame);
1055 template<
typename po
inter_t>
1069 template<
typename po
inter_t>
1072 else fail(
"null",
"not null", message, stack_frame);
1085 template<
typename po
inter_t>
1099 template<
typename po
inter_t>
1102 else fail(
"null",
"not null", message, stack_frame);
1116 template<
typename po
inter_t>
1131 template<
typename po
inter_t>
1134 else fail(
"null",
"not null", message, stack_frame);
1169 template<
typename value_t>
1183 template<
typename value_t>
1185 if (value > 0)
succeed(message, stack_frame);
1186 else fail(
"positive",
to_string(value), message, stack_frame);
1226 template<
typename value_t>
1240 template<
typename value_t>
1242 if (value ==
static_cast<value_t
>(0))
succeed(message, stack_frame);
1257 template<
typename exception_t>
1271 template<
typename exception_t>
1276 }
catch (
const exception_t&) {
1277 succeed(message, stack_frame);
1280 }
catch (
const std::exception&
e) {
1313 template<
typename collection_t>
1314 static auto empty(
const collection_t collection) ->
bool {
return collection.begin() == collection.end();}
Contains xtd::tunit::assert class.
static const basic_string empty_string
Definition basic_string.hpp:111
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.hpp:46
static auto current(const xtd::diagnostics::source_location &value=xtd::diagnostics::source_location::current()) noexcept -> xtd::diagnostics::stack_frame
Crates a new xtd::diagnostics::stack_frame object corresponding to the location of the call site.
Exception thow when an assertion failed.
Definition assert_error.hpp:17
The assert class contains a collection of static methods that implement the most common assertions us...
Definition assert.hpp:31
static auto are_equal(float expected, float actual, float tolerance, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that two type are equal.
static auto is_empty(const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that collection contains an item.
Definition assert.hpp:366
static auto is_not_null(const xtd::uptr< pointer_t > &pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is not null.
Definition assert.hpp:865
static auto is_empty(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that collection contains an item.
Definition assert.hpp:352
static auto is_negative(const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that ta condition is negative.
Definition assert.hpp:696
static auto is_not_null(const pointer_t *pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is not null.
Definition assert.hpp:805
static auto is_not_null(const std::optional< optional_t > &opt, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the optional is not std::nullopt.
Definition assert.hpp:821
static auto does_not_throw(const std::function< void()> &statement, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the staement does not throw an exception.
static auto is_greater_or_equal(const value1_t &val1, const value2_t &val2, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the first value is greater than or equal to the second value.
Definition assert.hpp:461
static auto is_positive(const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that ta condition is positive.
Definition assert.hpp:1184
static auto is_null(const pointer_t *pointer, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is null.
Definition assert.hpp:995
static auto throws(const std::function< void()> &statement, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the statement throws a particular exception when called.
Definition assert.hpp:1258
static auto is_not_null(const xtd::uptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is not null.
Definition assert.hpp:851
static auto is_not_null(const pointer_t *pointer, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is not null.
Definition assert.hpp:790
static auto is_greater(const value1_t &val1, const value2_t &val2, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the first value is greater than the second value.
Definition assert.hpp:436
static auto are_equal(double expected, double actual, double tolerance, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that two type are equal.
static auto is_positive(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that ta condition is positive.
Definition assert.hpp:1170
static auto are_equal(const expected_t &expected, const actual_t &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that two type are equal.
Definition assert.hpp:64
static auto is_not_null(const xtd::wptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is not null.
Definition assert.hpp:911
static auto is_greater_or_equal(const value1_t &val1, const value2_t &val2, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the first value is greater than or equal to the second value.
Definition assert.hpp:475
static auto is_not_empty(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that collection does not contain any item.
Definition assert.hpp:713
static auto is_null(const pointer_t *pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is null.
Definition assert.hpp:1010
static auto does_not_throw(const std::function< void()> &statement, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the staement does not throw an exception.
static auto is_NaN(double value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that a value is NaN.
static auto is_NaN(float value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that a value is NaN.
static auto is_null(const xtd::sptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is null.
Definition assert.hpp:1086
static auto are_same(const expected_t &expected, const actual_t &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that two objects do refer to differents objects.
Definition assert.hpp:263
static auto is_less(const value1_t &val1, const value2_t &val2, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the first value is is_less than the second value.
Definition assert.hpp:542
static auto are_equal(float expected, float actual, float tolerance, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that two type are equal.
static auto is_zero(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that ta condition is zero.
Definition assert.hpp:1227
static auto is_negative(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that ta condition is negative.
Definition assert.hpp:682
static auto is_not_empty(const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that collection does not contain any item.
Definition assert.hpp:727
static auto are_not_same(const expected_t &expected, const actual_t &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that two objects do refer to differents objects.
Definition assert.hpp:228
static auto is_not_null(const std::optional< optional_t > &opt, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the optional is not std::nullopt.
Definition assert.hpp:835
static auto are_same(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that two objects do refer to differents objects.
Definition assert.hpp:247
static auto is_not_instance_of(const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that an object is not of the type supplied or a derived type.
Definition assert.hpp:771
static auto is_NaN(double value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
that a value is NaN.
static auto are_not_same(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that two objects do refer to differents objects.
Definition assert.hpp:212
static auto throws_any(const std::function< void()> &statement, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the staement does not throw an exception.
static auto are_equal(double expected, double actual, double tolerance, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that two type are equal.
static auto is_true(bool condition, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that a condition is true.
static auto is_less_or_equal(const value1_t &val1, const value2_t &val2, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the first value is is_less than or equal to the second value.
Definition assert.hpp:581
static auto is_not_null(const xtd::sptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is not null.
Definition assert.hpp:881
static auto are_equal(long double expected, long double actual, long double tolerance, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that two type are equal.
static auto is_greater(const value1_t &val1, const value2_t &val2, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the first value is greater than the second value.
Definition assert.hpp:423
static auto contains(const item_t &item, const collection_t &collection, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that collection contains an item.
Definition assert.hpp:294
static auto is_not_null(const xtd::wptr< pointer_t > &pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is not null.
Definition assert.hpp:925
static auto is_not_instance_of(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that an object is not of the type supplied or a derived type.
Definition assert.hpp:758
static auto is_not_null(std::nullptr_t pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is not null.
static auto is_instance_of(const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that an object is of the type supplied or a derived type.
Definition assert.hpp:512
static auto is_null(const xtd::wptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is null.
Definition assert.hpp:1117
static auto is_zero(const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that ta condition is zero.
Definition assert.hpp:1241
static auto is_false(bool condition, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that a condition is false.
static auto is_not_zero(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that ta condition is not zero.
Definition assert.hpp:963
static auto is_true(bool condition, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that a condition is true.
static auto is_instance_of(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that an object is of the type supplied or a derived type.
Definition assert.hpp:499
static auto is_null(const std::optional< optional_t > &opt, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the optional is std::nullopt.
Definition assert.hpp:1040
static auto is_not_null(std::nullptr_t pointer, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is not null.
static auto is_null(const std::optional< optional_t > &opt, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the optional is std::nullopt.
Definition assert.hpp:1026
static auto is_NaN(long double value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that a value is NaN.
static auto are_not_equal(const expected_t &expected, const actual_t &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that two type are not equal.
Definition assert.hpp:185
static auto is_false(bool condition, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that a condition is false.
static auto is_null(const xtd::wptr< pointer_t > &pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is null.
Definition assert.hpp:1132
static auto is_null(std::nullptr_t pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is null.
static auto contains(const item_t &item, const collection_t &collection, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that collection contains an item.
Definition assert.hpp:280
static auto is_null(std::nullptr_t pointer, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is null.
static auto is_not_zero(const value_t &value, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that ta condition is not zero.
Definition assert.hpp:977
static auto is_null(const xtd::sptr< pointer_t > &pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is null.
Definition assert.hpp:1100
static auto is_less(const value1_t &val1, const value2_t &val2, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the first value is is_less than the second value.
Definition assert.hpp:529
static auto is_null(const xtd::uptr< pointer_t > &pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is null.
Definition assert.hpp:1070
static auto is_less_or_equal(const value1_t &val1, const value2_t &val2, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the first value is is_less than or equal to the second value.
Definition assert.hpp:567
static auto are_equal(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that two type are equal.
Definition assert.hpp:51
static auto is_null(const xtd::uptr< pointer_t > &pointer, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is null.
Definition assert.hpp:1056
static auto is_not_null(const xtd::sptr< pointer_t > &pointer, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the pointer is not null.
Definition assert.hpp:895
static auto are_not_equal(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that two type are not equal.
Definition assert.hpp:172
static auto throws_any(const std::function< void()> &statement, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that the staement does not throw an exception.
static auto is_NaN(long double value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
that a value is NaN.
static auto are_equal(long double expected, long double actual, long double tolerance, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Asserts that two type are equal.
static auto is_NaN(float value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
that a value is NaN.
The base class for assert.
Definition base_assert.hpp:33
static auto to_string(const value_t &value) -> xtd::string
Convert specified value to xtd::string.
Definition base_assert.hpp:153
static auto join_items(const collection_t &collection) -> xtd::string
Join specified collection into xtd::string.
Definition base_assert.hpp:164
static auto succeed(const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Generates a success with a generic message. This is used by the other assert functions.
static auto fail(const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Throws an xtd::tunit::assert_error exception. This is used by the other assert functions.
static auto equals(const value_a_t &value_a, const value_b_t &value_b) -> bool
Determines if specified values are equal.
Definition base_assert.hpp:179
#define tunit_export_
Define shared library export.
Definition tunit_export.hpp:13
#define typeof_
Used to obtain the type object of a specified type or object.
Definition typeof.hpp:24
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
char8_t char8
Represents a 8-bit unicode character.
Definition char8.hpp:26
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
std::weak_ptr< type_t > wptr
The xtd::uptr object is a weak pointer.
Definition wptr.hpp:17
xtd::unique_ptr_object< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
char16_t char16
Represents a 16-bit unicode character.
Definition char16.hpp:26
char32_t char32
Represents a 32-bit unicode character.
Definition char32.hpp:23
@ e
The E key.
Definition console_key.hpp:96
The tunit namespace contains a unit test library.
Definition abort_error.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
auto to_string() const noexcept -> xtd::string override
Returns the string representation of this xtd::read_only_span <type_t> object.
Definition read_only_span.hpp:342
const type_t * pointer
Represents the read_only_span pointer type.
Definition read_only_span.hpp:63
constexpr auto is_empty() const noexcept -> bool
Returns a value that indicates whether the current xtd::read_only_span <type_t> is empty.
Definition read_only_span.hpp:209