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

◆ is_true_

#define is_true_ (   ...)

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

Asserts that a condition is true.

Parameters
conditionThe condition to check is true.
messageAn optional user message to display if the assertion fails. This message can be seen in the unit test results.
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
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), "User message..."); // test error.
xtd::tunit::assume::is_false_(std::empty(s1)); // test ok.
xtd::tunit::assume::is_false_(std::empty(s2), "User message..."); // test error.
xtd::tunit::valid::is_false_(std::empty(s1)); // test ok.
xtd::tunit::valid::is_false_(std::empty(s2), "User message..."); // test error.