summaryrefslogtreecommitdiff
path: root/tools/qa
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-05-02 17:53:13 +0200
committerEike Rathke <erack@redhat.com>2017-05-02 21:12:11 +0200
commit246a2a54662eb52468f9a411b315a4300aaa17c0 (patch)
tree2973b7ac24f2e04e5341a571bc9f8c15d8318f75 /tools/qa
parent961fae9d75caf0cf52af62fdf9d9676ab0ab556f (diff)
Test that empty date is not a valid date
Change-Id: If5f2db3d4bae9158b482b01ce7dbb7335b4cb16b
Diffstat (limited to 'tools/qa')
-rw-r--r--tools/qa/cppunit/test_date.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/qa/cppunit/test_date.cxx b/tools/qa/cppunit/test_date.cxx
index c2c31e10b51c..2ea3673082a2 100644
--- a/tools/qa/cppunit/test_date.cxx
+++ b/tools/qa/cppunit/test_date.cxx
@@ -61,6 +61,10 @@ void DateTest::testDate()
aDate.Normalize();
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
aDate.SetYear(1);
aDate.SetMonth(0);