]>
git.saurik.com Git - wxWidgets.git/blob - tests/testprec.h
5 // need this to be able to use CPPUNIT_ASSERT_EQUAL with wxString objects
7 // NB: at least for VC7.1 the specialization must be done before cppunit
8 // headers inclusion as otherwise it's just ignored!
12 template <typename T
> struct assertion_traits
;
15 struct assertion_traits
<wxString
>
17 static bool equal(const wxString
& s1
, const wxString
& s2
)
22 static std::string
toString(const wxString
& s
)
24 return std::string(s
.mb_str());
28 } // namespace CppUnit
30 #include "wx/cppunit.h"
32 // define wxHAVE_U_ESCAPE if the compiler supports \uxxxx character constants
33 #if (defined(__VISUALC__) && (__VISUALC__ >= 1300)) || \
34 (defined(__GNUC__) && (__GNUC__ >= 3))
35 #define wxHAVE_U_ESCAPE
38 #define CPPUNIT_ASSERT_STR_EQUAL(s1, s2) \
39 CPPUNIT_ASSERT_EQUAL( wxString(s1), wxString(s2) )