CppUnit project page | FAQ | CppUnit home page |
#include <TestAssert.h>
Static Public Methods | |
bool | equal (const T &x, const T &y) |
std::string | toString (const T &x) |
Here is an example of specialization of that traits:
template<> struct assertion_traits<std::string> // specialization for the std::string type { static bool equal( const std::string& x, const std::string& y ) { return x == y; } static std::string toString( const std::string& x ) { std::string text = '"' + x + '"'; // adds quote around the string to see whitespace OStringStream ost; ost << text; return ost.str(); } };
|
|
|
|
hosts this site. |
Send comments to: CppUnit Developers |