template<class>
Corrade::TestSuite::Compare::Container class

Pseudo-type for comparing container contents.

Prints the length of both containers (if they are different) and then prints value of the first different item in both containers. Example usage:

std::vector<int> a, b;
CORRADE_COMPARE_AS(a, b, TestSuite::Compare::Container);

Comparison of containers of floating-point types is by default done as a fuzzy-compare, delegated to Comparator<float> and Comparator<double>.

This comparator can only compare containers that have random access (i.e., implementing operator[]()). For comparing non-randomly-accessible containers (such as std::list or std::map) and unordered containers (such as std::unordered_map) use SortedContainer instead.

See Comparing with pseudo-types for more information.