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

◆ all_items_are_instances_of() [1/4]

template<typename expected_t , typename collection_t >
static void xtd::tunit::collection_valid::all_items_are_instances_of ( const collection_t &  collection)
inlinestatic

Validates that all collection items are of the type supplied or a derived type.

Parameters
valueThe object to verify
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
std::vector<std::ios_base*> a = {&std::cout, &std::cerr, &std::cin};
xtd::tunit::collection_valid::all_items_are_instances_of<std::ios_base*>(a); // test ok.
xtd::tunit::collection_valid::all_items_are_instances_of<std::basic_ostream<char>*>(a); // test fails.
@ a
The A key.