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

◆ is_null() [2/24]

template<typename pointer_t >
static void xtd::tunit::valid::is_null ( const pointer_t *  pointer,
const xtd::diagnostics::stack_frame stack_frame 
)
inlinestatic

Validates that the pointer is null.

Parameters
pointerThe pointer to check is null.
stack_frameContains information about current file and current line.
Examples
std::string str = "Anything";
std::string* s1 = nullptr;
std::string* s2 = &str;
xtd::tunit::valid::is_null(s2, csf_); // test fails.
static void is_null(const pointer_t *pointer)
Validates that the pointer is null.
Definition valid.h:1739
#define csf_
Provides information about the current stack frame.
Definition current_stack_frame.h:30