Kaydet (Commit) 246a2a54 authored tarafından Eike Rathke's avatar Eike Rathke

Test that empty date is not a valid date

Change-Id: If5f2db3d4bae9158b482b01ce7dbb7335b4cb16b
üst 961fae9d
...@@ -61,6 +61,10 @@ void DateTest::testDate() ...@@ -61,6 +61,10 @@ void DateTest::testDate()
aDate.Normalize(); aDate.Normalize();
CPPUNIT_ASSERT_EQUAL( aMax.GetDate(), aDate.GetDate()); CPPUNIT_ASSERT_EQUAL( aMax.GetDate(), aDate.GetDate());
// Empty date is not a valid date.
aDate = Date( Date::EMPTY );
CPPUNIT_ASSERT( !aDate.IsValidDate());
// 0001-00-x normalized to -0001-12-x // 0001-00-x normalized to -0001-12-x
aDate.SetYear(1); aDate.SetYear(1);
aDate.SetMonth(0); aDate.SetMonth(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment