xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.

◆ is_ordered() [2/4]

template<typename TValue >
static void xtd::tunit::collection_assume::is_ordered ( const TValue &  value,
const xtd::tunit::line_info line_info 
)
inlinestatic

Assumes that collection is ordered.

Parameters
valueThe value to check is empty.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::abort_errorIf bad assertion.
Examples
std::vector<int> v1 = {1, 2, 3, 4};
std::vector<int> v2 = {1, 2, 4, 3};
xtd::tunit::assert::is_ordered(v1, line_info_); // test ok.
xtd::tunit::assert::is_ordered(v2, line_info_);// test throws an abort_error exception.