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

◆ is_not_instance_of() [2/4]

template<typename type_t , typename value_t >
static void xtd::tunit::valid::is_not_instance_of ( const value_t &  value,
const xtd::diagnostics::stack_frame stack_frame 
)
inlinestatic

Validates that an object is not of the type supplied or a derived type.

Parameters
valueThe object to verify
stack_frameContains information about current file and current line.
Examples
std::invalid_argument except("invalid argument");
xtd::tunit::valid::is_not_instance_of<std::bad_cast>(except, csf_); // test ok.
xtd::tunit::valid::is_not_instance_of<std::logic_error>(except, csf_); // test fails
#define csf_
Provides information about the current stack frame.
Definition current_stack_frame.h:30