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.

◆ all_items_are_unique() [4/4]

template<typename TCollection >
static void xtd::tunit::collection_assume::all_items_are_unique ( const TCollection &  collection,
const std::string &  message,
const xtd::tunit::line_info line_info 

Assumes that all collection items are unique.

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.
xtd::tunit::abort_errorIf bad assertion.
std::vector<int> a1 = {1, 2, 3, 4};
std::vector<int> a2 = {1, 2, 3, 4, 1};
xtd::tunit::collection_assume::all_items_are_unique(a2, "User message...", line_info_);// test throws an abort_error exception..