]> git.saurik.com Git - wxWidgets.git/commitdiff
remove the just added assertEquals(time_t, long) overload, it results in infinite...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Jul 2008 20:07:36 +0000 (20:07 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Jul 2008 20:07:36 +0000 (20:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/cppunit.h
tests/datetime/datetimetest.cpp

index abf423e3f93af0e3b520bf4c4b4f8cae7668594b..503ed3e8e06724ad9b59d581d382f8af592876ec 100644 (file)
@@ -116,17 +116,6 @@ assertEquals(int expected,
     assertEquals(size_t(expected), actual, sourceLine, message);
 }
 
     assertEquals(size_t(expected), actual, sourceLine, message);
 }
 
-// and another, slightly different, for checking that result of potentially
-// different time_t type is the same as given time_t value
-inline void
-assertEquals(time_t expected,
-             long actual,
-             CppUnit::SourceLine sourceLine,
-             const std::string& message)
-{
-    assertEquals(expected, time_t(actual), sourceLine, message);
-}
-
 CPPUNIT_NS_END
 
 // Use this macro to compare a wxArrayString with the pipe-separated elements
 CPPUNIT_NS_END
 
 // Use this macro to compare a wxArrayString with the pipe-separated elements
index 6add06a43126a505f8beb8a9b1568a3a9a65efb8..48611e4480043297a2bf9c6c34122264ed63e380 100644 (file)
@@ -761,7 +761,7 @@ void DateTimeTestCase::TestTimeTicks()
 
         // GetValue() returns internal UTC-based representation, we need to
         // convert it to local TZ before comparing
 
         // GetValue() returns internal UTC-based representation, we need to
         // convert it to local TZ before comparing
-        long ticks = (dt.GetValue() / 1000).ToLong() + TZ_LOCAL.GetOffset();
+        time_t ticks = (dt.GetValue() / 1000).ToLong() + TZ_LOCAL.GetOffset();
         if ( dt.IsDST() )
             ticks += 3600;
         CPPUNIT_ASSERT_EQUAL( d.gmticks, ticks + tzOffset );
         if ( dt.IsDST() )
             ticks += 3600;
         CPPUNIT_ASSERT_EQUAL( d.gmticks, ticks + tzOffset );