Correct the test for ParseFormat() with fall back date
This was added back in b5f85206a9 (fix ParseFormat("%d") to set the date
it finds (#10002), 2008-09-26), but the test didn't do what the comment
said and didn't use the default date object it added.
Fix this now to finally do what was intended all these years ago.
This commit is contained in:
parent
da48b9e45d
commit
2cf0537722
1 changed files with 3 additions and 1 deletions
|
|
@ -870,8 +870,10 @@ void DateTimeTestCase::TestTimeFormat()
|
|||
|
||||
// test partially specified dates too
|
||||
wxDateTime dtDef(26, wxDateTime::Sep, 2008);
|
||||
CPPUNIT_ASSERT( dt.ParseFormat("17", "%d") );
|
||||
CPPUNIT_ASSERT( dt.ParseFormat("17", "%d", dtDef) );
|
||||
CPPUNIT_ASSERT_EQUAL( 17, dt.GetDay() );
|
||||
CPPUNIT_ASSERT_EQUAL( wxDateTime::Sep, dt.GetMonth() );
|
||||
CPPUNIT_ASSERT_EQUAL( 2008, dt.GetYear() );
|
||||
|
||||
// test some degenerate cases
|
||||
CPPUNIT_ASSERT( !dt.ParseFormat("", "%z") );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue