+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);
+}
+
+// and another to be able to specify (usually literal) ints as expected values
+// for functions returning any of unsigned {int,long} or size_t
+inline void
+assertEquals(int expected,
+ unsigned actual,
+ CppUnit::SourceLine sourceLine,
+ const std::string& message)
+{
+ assertEquals(unsigned(expected), actual, sourceLine, message);
+}
+
+inline void
+assertEquals(int expected,
+ unsigned long actual,
+ CppUnit::SourceLine sourceLine,
+ const std::string& message)
+{
+ assertEquals((unsigned long)expected, actual, sourceLine, message);
+}
+
+// we also need this one to resolve ambiguity in the tests comparing unsigned
+// short (e.g. wxDateTime_t returned by several wxDateTime methods) with
+// literal integer constants
+inline void
+assertEquals(int expected,
+ unsigned short actual,
+ CppUnit::SourceLine sourceLine,
+ const std::string& message)
+{
+ assertEquals((unsigned short)expected, actual, sourceLine, message);
+}