From 3896f1cc5fa8b6ab3def7deac861bfdbfdb4df96 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 2 Nov 2008 00:52:41 +0000 Subject: [PATCH] add assertEquals(int,unsigned short) overload to resolve the ambiguity resulting in tests comparing unsigned short with literal integer constants now that we have both assertEqals(int,unsigned int) and assertEquals(int, unsigned long) to satisfy VC6 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/cppunit.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/wx/cppunit.h b/include/wx/cppunit.h index 51d0925e3f..2aa1a7950f 100644 --- a/include/wx/cppunit.h +++ b/include/wx/cppunit.h @@ -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 -- 2.50.0