X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2Fauto_unit_test.hh;h=1163e693ccb01eedf392d45bd9dd131f7888cdb9;hb=9c0d069987191bce78e13cdba410c34d34e736c2;hp=c12bb7d90e7c8d41e52fbe306703dfc8408ee5ce;hpb=601d1f509f5bb24df167a4dd5a20da67a0af9af8;p=senf.git diff --git a/senf/Utils/auto_unit_test.hh b/senf/Utils/auto_unit_test.hh index c12bb7d..1163e69 100644 --- a/senf/Utils/auto_unit_test.hh +++ b/senf/Utils/auto_unit_test.hh @@ -41,6 +41,7 @@ #include //#include "auto_unit_test.mpp" +#include "auto_unit_test.ih" ///////////////////////////////hh.p//////////////////////////////////////// #if BOOST_VERSION >= 103400 @@ -94,10 +95,31 @@ try { expr ; } \ catch (std::exception & e) { std::cerr << e.what() << std::endl; throw; } ) +namespace senf { +namespace test { + + template + typename detail::NoCharIterator::type nocharIterator(Iterator i); + +}} + +/** \brief Check ranges for equality, writing char's as int's + + \ref SENF_CHECK_EQUAL_COLLECTIONS() is like \c BOOST_CHECK_EQUAL_COLLECTIONS(). The only + difference is, that \ref SENF_CHECK_EQUAL_COLLECTIONS() will write out collection values in + numeric form (and not as single characters) if the elements are of any char type. Other types + are not affected. + + \ingroup unittest + */ +#define SENF_CHECK_EQUAL_COLLECTIONS(a,b,c,d) \ + BOOST_CHECK_EQUAL_COLLECTIONS(senf::test::nocharIterator(a), senf::test::nocharIterator(b), \ + senf::test::nocharIterator(c), senf::test::nocharIterator(d)) + ///////////////////////////////hh.e//////////////////////////////////////// //#include "auto_unit_test.cci" //#include "auto_unit_test.ct" -//#include "auto_unit_test.cti" +#include "auto_unit_test.cti" #endif