X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/99d800190a04a2deaf769017a5fae04a4ae50378..8a7afe4dfef33756855c0e7bd38cf20d0d9a9e2f:/include/wx/cppunit.h diff --git a/include/wx/cppunit.h b/include/wx/cppunit.h index b7848534a3..38fcfee82a 100644 --- a/include/wx/cppunit.h +++ b/include/wx/cppunit.h @@ -77,6 +77,21 @@ #define WXTEST_FAIL_WITH_CONDITION(suiteName, Condition, testMethod) \ WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, CPPUNIT_TEST_FAIL(testMethod)) +// Use this macro to compare a wxString with a literal string. +#define WX_ASSERT_STR_EQUAL(p, s) CPPUNIT_ASSERT_EQUAL(wxString(p), s) + + +/////////////////////////////////////////////////////////////////////////////// +// stream inserter for wxString +// + +#include "wx/string.h" + +inline std::ostream& operator<<(std::ostream& o, const wxString& s) +{ + return o << s.mb_str(); +} + /////////////////////////////////////////////////////////////////////////////// // Some more compiler warning tweaking and auto linking.