From: Vadim Zeitlin Date: Thu, 30 Oct 2008 23:22:10 +0000 (+0000) Subject: for some reason having int/size_t assertEquals() overload is not always enough for... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0fbfcdd068deb72c4e59f8113d1c16741ecfb166 for some reason having int/size_t assertEquals() overload is not always enough for VC6, so provide both unsigned int/long overloads instead and rely on size_t being one of them git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/cppunit.h b/include/wx/cppunit.h index 503ed3e8e0..51d0925e3f 100644 --- a/include/wx/cppunit.h +++ b/include/wx/cppunit.h @@ -106,14 +106,23 @@ assertEquals(const wchar_t *expected, } // and another to be able to specify (usually literal) ints as expected values -// for functions returning size_t +// for functions returning any of unsigned {int,long} or size_t inline void assertEquals(int expected, - size_t actual, + unsigned actual, CppUnit::SourceLine sourceLine, const std::string& message) { - assertEquals(size_t(expected), actual, sourceLine, 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); } CPPUNIT_NS_END