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

◆ are_same() [4/4]

template<typename expected_t , typename actual_t >
static void xtd::tunit::valid::are_same ( const expected_t &  expected,
const actual_t &  actual,
const xtd::string message,
const xtd::diagnostics::stack_frame stack_frame 
)
inlinestatic

Validates that two objects do refer to different objects.

Parameters
expectedthe expected value.
actualthe actual value.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
stack_frameContains information about current file and current line.
Examples
int a = 24;
int& b = a;
int c = 24;
xtd::tunit::valid::are_same(b, a, "User message...", csf_); // test ok.
xtd::tunit::valid::are_same(c, a, "User message...", csf_); // test fails.
static void are_same(const expected_t &expected, const actual_t &actual)
Validates that two objects do refer to different objects.
Definition valid.h:385
#define csf_
Provides information about the current stack frame.
Definition current_stack_frame.h:30
@ a
The A key.
@ c
The C key.
@ b
The B key.