xtd 0.2.0
Loading...
Searching...
No Matches

◆ fail_

#define fail_ (   ...)

#include <xtd.tunit/include/xtd/tunit/assert.h>

Throws an xtd::tunit::assert_error exception. This is used by the other assert functions.

Parameters
messageAn optional user message to display if the assertion fails. This message can be seen in the unit test results.
Exceptions
xtd::tunit::assert_errorIf bad assertion.
Remarks
Contains information about current file and current line.
Can be used with xtd::tunit::assert, xtd::tunit::assume and xtd::tunit::valid classes.
Examples
xtd::tunit::assert::fail_("User message..."); // test throws an assert_error exception.
xtd::tunit::assume::fail_("User message..."); // test throws an assert_error exception.
xtd::tunit::valid::fail_("User message..."); // test throws an assert_error exception.