fix wxTimeSpan::Format() for negative spans with 0 hour component (#10055)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -738,13 +738,15 @@ void DateTimeTestCase::TestTimeSpanFormat()
|
||||
{ 219, 0, 0, 0, "%H", "219" },
|
||||
{ 219, 0, 0, 0, "%D, %H", "9, 03" },
|
||||
{ 219, 0, 0, 0, "%E, %D, %H", "1, 2, 03" },
|
||||
{ 0, -1, 0, 0, "%H:%M:%S", "-00:01:00" },
|
||||
{ 0, 0, -1, 0, "%H:%M:%S", "-00:00:01" },
|
||||
};
|
||||
|
||||
for ( size_t n = 0; n < WXSIZEOF(testSpans); n++ )
|
||||
{
|
||||
const TimeSpanFormatTestData& td = testSpans[n];
|
||||
wxTimeSpan ts(td.h, td.min, td.sec, td.msec);
|
||||
CPPUNIT_ASSERT_EQUAL( wxString(td.result), ts.Format(td.fmt) );
|
||||
CPPUNIT_ASSERT_EQUAL( td.result, ts.Format(td.fmt) );
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user