From 4c72cd1c8e8a6b19503d35a246615779d4d34dd9 Mon Sep 17 00:00:00 2001 From: Praveen Arimbrathodiyil Date: Sun, 11 Jan 2009 19:38:32 -0800 Subject: * added some more dates to test case --- calendar/kde/kdelibs/kdecore/tests/kcalendartest.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'calendar') diff --git a/calendar/kde/kdelibs/kdecore/tests/kcalendartest.cpp b/calendar/kde/kdelibs/kdecore/tests/kcalendartest.cpp index 14c9df2..e22a6a3 100644 --- a/calendar/kde/kdelibs/kdecore/tests/kcalendartest.cpp +++ b/calendar/kde/kdelibs/kdecore/tests/kcalendartest.cpp @@ -136,7 +136,6 @@ void KCalendarTest::testIndic() QCOMPARE( calendar->day(testDate), 1 ); QDate newDate = calendar->addYears(testDate, 4); -// doubt QCOMPARE( newDate.year(), 2082 ); QCOMPARE( calendar->daysInYear(newDate), 365 ); @@ -149,9 +148,16 @@ void KCalendarTest::testIndic() QCOMPARE( newDate.year(), 2078 ); QCOMPARE( newDate.month(), 2 ); QCOMPARE( newDate.day(), 10 ); + + QDate myDate(2009, 1, 11); + QCOMPARE( calendar->year(myDate), 1930); + myDate = calendar->addDays(myDate, 32); + QCOMPARE(myDate.month(),2); + QCOMPARE( calendar->day(myDate),23); } + void KCalendarTest::testGregorianBasic() { const KCalendarSystem *calendar = KCalendarSystem::create(QString("gregorian")); -- cgit