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

◆ are_same_

#define are_same_ (   ...)

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

Asserts that two objects do refer to same objects.

Parameters
expectedthe expected value.
actualthe actual value.
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 a = 24;
int& b = a;
int c = 24;
xtd::tunit::assert::are__same_(c, a, "User message..."); // test error.
xtd::tunit::assert::are_same_(b, a); // test ok.
xtd::tunit::assume::are_same_(c, a, "User message..."); // test error.
xtd::tunit::assume::are_same_(b, a); // test ok.
xtd::tunit::valid::are_same_(c, a, "User message..."); // test error.
xtd::tunit::valid::are_same_(b, a); // test ok.