brown paper bag bug: replaced 'static char' with std:string as return value
[senf.git] / senf / Utils / auto_unit_test.hh
index c12bb7d..1163e69 100644 (file)
@@ -41,6 +41,7 @@
 #include <boost/version.hpp>
 
 //#include "auto_unit_test.mpp"
+#include "auto_unit_test.ih"
 ///////////////////////////////hh.p////////////////////////////////////////
 
 #if BOOST_VERSION >= 103400
         try { expr ; }                                                                            \
         catch (std::exception & e) { std::cerr << e.what() << std::endl; throw; } )
 
+namespace senf {
+namespace test {
+
+    template <class Iterator>
+    typename detail::NoCharIterator<Iterator>::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
 
 \f