xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.

◆ is_true() [1/4]

static void xtd::tunit::assert::is_true ( bool  condition)
inlinestatic

Asserts that ta condition is true.

Parameters
conditionThe condition to check is true.
Exceptions
xtd::tunit::assertion_errorIf bad assertion.
Examples
std::string s1;
std::string s2 = "Anything";
xtd::tunit::assert::is_false(std::empty(s1)); // test ok.
xtd::tunit::assert::is_false(std::empty(s2)); // test throws an assertion_error exception.