X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14dc53b2f3690c4f4e5af0cbfd0e44a633a21c3e..57d7f9888e18d350fb023fdccd39e0ab7a3bb8dd:/include/wx/cppunit.h diff --git a/include/wx/cppunit.h b/include/wx/cppunit.h index 756ecfa118..38fcfee82a 100644 --- a/include/wx/cppunit.h +++ b/include/wx/cppunit.h @@ -5,6 +5,7 @@ // Created: 15.02.04 // RCS-ID: $Id$ // Copyright: (c) 2004 Vadim Zeitlin +// Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_CPPUNIT_H_ @@ -76,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.