Diffstat (limited to 'libopie/pim/test/oevent_test.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie/pim/test/oevent_test.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libopie/pim/test/oevent_test.cpp b/libopie/pim/test/oevent_test.cpp new file mode 100644 index 0000000..50cc032 --- a/dev/null +++ b/libopie/pim/test/oevent_test.cpp | |||
@@ -0,0 +1,23 @@ | |||
1 | #include <qdatetime.h> | ||
2 | |||
3 | #include "../oevent.h" | ||
4 | |||
5 | int main(int argc, char* argv ) { | ||
6 | OEvent ev; | ||
7 | ev.setUid( 20 ); | ||
8 | |||
9 | ev.setDescription( "Foo" ); | ||
10 | |||
11 | OEvent ev2 = ev; | ||
12 | ev2.setDescription("Foo2"); | ||
13 | qWarning("%s", ev2.description().latin1() ); | ||
14 | qWarning("%s", ev.description().latin1() ); | ||
15 | |||
16 | QDateTime time = QDateTime::currentDateTime(); | ||
17 | ev2.setStartDateTime( time ); | ||
18 | ev2.setTimeZone( "Europe/London" ); | ||
19 | |||
20 | qWarning("%s", ev2.startDateTime().toString().latin1() ); | ||
21 | qWarning("%s", ev2.startDateTimeInZone().toString().latin1() ); | ||
22 | return 0; | ||
23 | } | ||