]> git.saurik.com Git - wxWidgets.git/commitdiff
add assertEquals(int,unsigned short) overload to resolve the ambiguity resulting...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Nov 2008 00:52:41 +0000 (00:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Nov 2008 00:52:41 +0000 (00:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/cppunit.h

index 51d0925e3fa468d169e9cda51bd8324b06b965a2..2aa1a7950fd79a25e7d307f480e6167b8a93508d 100644 (file)
@@ -125,6 +125,18 @@ assertEquals(int expected,
     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);
+}
+
 CPPUNIT_NS_END
 
 // Use this macro to compare a wxArrayString with the pipe-separated elements