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.

◆ fail() [4/4]

static void xtd::tunit::base_assert::fail ( const std::string &  message,
const xtd::tunit::line_info line_info 

Throws an xtd::tunit::assertion_error exception. This is used by the other Assert functions.

messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
xtd::tunit::assertion_errorIf bad assertion.
xtd::tunit::assert::fail("User message...", line_info_); // test throws an assertion_error exception.