]> git.saurik.com Git - wxWidgets.git/commitdiff
for some reason having int/size_t assertEquals() overload is not always enough for...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 30 Oct 2008 23:22:10 +0000 (23:22 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 30 Oct 2008 23:22:10 +0000 (23:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/cppunit.h

index 503ed3e8e06724ad9b59d581d382f8af592876ec..51d0925e3fa468d169e9cda51bd8324b06b965a2 100644 (file)
@@ -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