summaryrefslogtreecommitdiff
path: root/libopie/pim/test/oevent_test.cpp
Side-by-side diff
Diffstat (limited to 'libopie/pim/test/oevent_test.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/test/oevent_test.cpp23
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 @@
+#include <qdatetime.h>
+
+#include "../oevent.h"
+
+int main(int argc, char* argv ) {
+ OEvent ev;
+ ev.setUid( 20 );
+
+ ev.setDescription( "Foo" );
+
+ OEvent ev2 = ev;
+ ev2.setDescription("Foo2");
+ qWarning("%s", ev2.description().latin1() );
+ qWarning("%s", ev.description().latin1() );
+
+ QDateTime time = QDateTime::currentDateTime();
+ ev2.setStartDateTime( time );
+ ev2.setTimeZone( "Europe/London" );
+
+ qWarning("%s", ev2.startDateTime().toString().latin1() );
+ qWarning("%s", ev2.startDateTimeInZone().toString().latin1() );
+ return 0;
+}