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.

◆ are_equal() [1/4]

template<typename TExpected , typename TAcutal >
static void xtd::tunit::collection_assume::are_equal ( const TExpected &  expected,
const TAcutal &  actual 
)
inlinestatic

Assumes that all collection items are equal.

Parameters
valueThe object to verify
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
line_infoContains information about current file and current line.
Exceptions
xtd::tunit::abort_errorIf bad assertion.
Examples
std::vector<int> a = {1, 2, 3, 4};
xtd::tunit::collection_assume::are_equal({1, 2, 3, 4}, a); // test ok.
xtd::tunit::collection_assume::are_equal({4, 3, 2, 1}, a);// test throws an abort_error exception..