Added BOOST_TEST_ALL_EQ macro to compare container contents

This commit is contained in:
Bjorn Reese committed 2017-02-11 15:03:45 +01:00
1 parent 9dd5285dbb
commit 3bc56800cd
3 files changed
+60

No files matched your search

+9
View File
@@ -38,6 +38,7 @@ When using `lightweight_test.hpp`, *do not forget* to
#define BOOST_TEST_NE(expr1, expr2) /*unspecified*/
#define BOOST_TEST_CSTR_EQ(expr1, expr2) /*unspecified*/
#define BOOST_TEST_CSTR_NE(expr1, expr2) /*unspecified*/
#define BOOST_TEST_ALL_EQ(begin1, end1, begin2, end2) /* unspecified */
#define BOOST_TEST_THROWS(expr, excep) /*unspecified*/
namespace boost
@@ -121,6 +122,14 @@ BOOST_TEST_CSTR_NE(expr1, expr2)
Specialization of BOOST_TEST_NE which interprets expr1 and expr2 as pointers to null-terminated byte strings (C strings). If `std::strcmp(expr1, expr2) == 0`, increase the error count and output a message containing both expressions.
[section BOOST_TEST_ALL_EQ]
``
BOOST_TEST_ALL_EQ(begin1, end1, begin2, end2)
``
Compares the content of two containers. If they have different sizes, or if any pairwise element differs, increases the error count and outputs a message containing all differing elements.
[endsect]
[section BOOST_TEST_THROWS]