handle negative time spans correctly in Format()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-07-20 15:04:10 +00:00
parent 1226b3b335
commit e566ccf1ba
3 changed files with 36 additions and 5 deletions

View File

@@ -689,6 +689,8 @@ void DateTimeTestCase::TestTimeSpanFormat()
{ 12, 34, 56, 789, _T("%H:%M:%S.%l"), _T("12:34:56.789") },
{ 1, 2, 3, 0, _T("%H:%M:%S"), _T("01:02:03") },
{ 1, 2, 3, 0, _T("%S"), _T("3723") },
{ -1, -2, -3, 0, _T("%S"), _T("-3723") },
{ -1, -2, -3, 0, _T("%H:%M:%S"), _T("-01:02:03") },
};
for ( size_t n = 0; n < WXSIZEOF(testSpans); n++ )