xtd
0.2.0
Loading...
Searching...
No Matches
◆
does_not_throw()
[1/4]
static void xtd::tunit::assert::does_not_throw
(
const std::function< void()> &
statement
)
static
Asserts that the staement does not throw an exception.
Parameters
statement
The statement that verify.
Exceptions
xtd::tunit::assert_error
If bad assertion.
Examples
std::vector<int> v1 = {1, 2, 3, 4};
xtd::tunit::assert::does_not_throw
([&] {v1.at(2);});
// test ok.
xtd::tunit::assert::does_not_throw
([&] {v1.at(5);});
// test throws an assert_error exception.
xtd::tunit::assert::does_not_throw
static void does_not_throw(const std::function< void()> &statement)
Asserts that the staement does not throw an exception.
xtd
tunit
assert
Generated on Sat Sep 14 2024 21:25:32 for xtd by
Gammasoft
. All rights reserved.