+CPPUNIT_NS_BEGIN
+
+// provide an overload of cppunit assertEquals(T, T) which can be used to
+// compare wxStrings directly with C strings
+inline void
+assertEquals(const char *expected,
+ const wxString& actual,
+ CppUnit::SourceLine sourceLine,
+ const std::string& message)
+{
+ assertEquals(wxString(expected), actual, sourceLine, message);
+}
+
+inline void
+assertEquals(const wchar_t *expected,
+ const wxString& actual,
+ CppUnit::SourceLine sourceLine,
+ const std::string& message)
+{
+ assertEquals(wxString(expected), actual, sourceLine, message);
+}
+
+#define WX_CPPUNIT_ASSERT_EQUALS(T1, T2) \
+ inline void \
+ assertEquals(T1 expected, \
+ T2 actual, \
+ CppUnit::SourceLine sourceLine, \
+ const std::string& message) \
+ { \
+ if ( !assertion_traits<T1>::equal(expected,actual) ) \
+ { \
+ Asserter::failNotEqual( assertion_traits<T1>::toString(expected), \
+ assertion_traits<T2>::toString(actual), \
+ sourceLine, \
+ message ); \
+ } \
+ }
+
+// and another to be able to specify (usually literal) ints as expected values
+// for functions returning size_t
+WX_CPPUNIT_ASSERT_EQUALS(int, size_t)
+
+// special section with VC6 workarounds: due to incorrect resolution of
+// overloaded/template functions in this compiler (it basically doesn't use the
+// template version at all if any overloaded function matches partially even if
+// none of them matches fully) we also need
+#ifdef __VISUALC6__
+
+WX_CPPUNIT_ASSERT_EQUALS(int, int)
+WX_CPPUNIT_ASSERT_EQUALS(size_t, size_t)
+
+#endif // VC6