#include <xtd/xtd>
namespace unit_tests {
class test_class_(assert_syntax_tests) {
assert_that(2 + 2).is().equal_to(4);
assert_that(2 + 2).is().not_().equal_to(5);
assert::are_equal(4, 2 + 2);
assert::are_not_equal(5, 2 + 2);
}
assert_that("").is().empty();
assert_that(array<int> {}).is().empty();
assert_that("Hello!").is().not_().empty();
assert_that(array {1, 2, 3}).is().not_().empty();
assert::is_empty("");
assert::is_empty(array<int> {});
assert::is_not_empty("Hello!");
assert::is_not_empty(array {1, 2, 3});
}
auto v1 = 1;
auto& v2 = v1;
auto v3 = v1;
assert_that(v2).is().same_as(v1);
assert_that(v3).is().not_().same_as(v1);
assert::are_same(v1, v2);
assert::are_not_same(v1, v3);
}
};
}
auto main() -> int {
return console_unit_test {}.run();
}
#define test_method_(method_name)
Add test method to class test.
Definition test_method_attribute.hpp:72