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

◆ is_positive_

#define is_positive_ (   ...)

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

Asserts that ta condition is positive.

Parameters
valueThe value to check is positive.
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
int i1 = 1;
int i2 = -1;
xtd::tunit::assert::is_positive_(i1); // test ok.
xtd::tunit::assert::is_positive_(i2, "User message..."); // test error.
xtd::tunit::assume::is_positive_(i1); // test ok.
xtd::tunit::assume::is_positive_(i2, "User message..."); // test error.
xtd::tunit::valid::is_positive_(i1); // test ok.
xtd::tunit::valid::is_positive_(i2, "User message..."); // test error.