[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs/kcal/tests
From: Sergio Luis Martins <iamsergio () gmail ! com>
Date: 2009-02-27 17:05:07
Message-ID: 1235754307.783387.10877.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 932967 by smartins:
Add unit test for Todo::setCompleted()
M +21 -0 testtodo.cpp
M +1 -0 testtodo.h
--- trunk/KDE/kdepimlibs/kcal/tests/testtodo.cpp #932966:932967
@@ -98,3 +98,24 @@
Todo todo2 = todo1;
QVERIFY( todo1 == todo2 );
}
+
+void TodoTest::testSetCompleted() {
+
+ Todo todo1, todo2;
+ todo1.setSummary( "Todo Summary" );
+ todo2.setSummary( "Todo Summary" );
+ KDateTime today = KDateTime::currentUtcDateTime();
+
+ // due yesterday
+ KDateTime originalDueDate = today.addDays( -1 );
+
+ todo1.setDtDue( originalDueDate );
+ todo1.recurrence()->setDaily( 1 );
+ todo1.setCompleted( today );
+
+ todo2.setCompleted( true );
+
+ QVERIFY( originalDueDate != todo1.dtDue() );
+ QVERIFY( !todo1.isCompleted() );
+ QVERIFY( todo2.isCompleted() );
+}
--- trunk/KDE/kdepimlibs/kcal/tests/testtodo.h #932966:932967
@@ -31,6 +31,7 @@
void testCompare();
void testClone();
void testAssign();
+ void testSetCompleted();
};
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic