summaryrefslogtreecommitdiffstats
path: root/PerlTQt/t/c_qapp.t
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-01-01 18:29:30 -0600
committerTimothy Pearson <[email protected]>2012-01-01 18:29:30 -0600
commitb2af005db21bd8fd068cb79b2ae700953128af2c (patch)
treeabd0ed633726bf0bbecb57d30e92836c31e02695 /PerlTQt/t/c_qapp.t
parentc1b9383f2032d82db5eb8918dca885e37a901dde (diff)
downloadlibtqt-perl-b2af005db21bd8fd068cb79b2ae700953128af2c.tar.gz
libtqt-perl-b2af005db21bd8fd068cb79b2ae700953128af2c.zip
Move PerlQt
Diffstat (limited to 'PerlTQt/t/c_qapp.t')
-rw-r--r--PerlTQt/t/c_qapp.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/PerlTQt/t/c_qapp.t b/PerlTQt/t/c_qapp.t
new file mode 100644
index 0000000..01d6b39
--- /dev/null
+++ b/PerlTQt/t/c_qapp.t
@@ -0,0 +1,23 @@
+BEGIN { print "1..3\n" }
+
+use TQt;
+
+$a=0;
+
+# testing if the TQt::Application ctor works
+
+eval { $a=TQt::Application(\@ARGV) };
+
+print +$@ ? "not ok\n" : "ok 1\n";
+
+# testing wether the global object is properly setup
+
+eval { TQt::app()->libraryPaths() };
+
+print +$@ ? "not ok\n" : "ok 2\n";
+
+# one second test of the event loop
+
+TQt::Timer::singleShot( 300, TQt::app(), TQT_SLOT "quit()" );
+
+print TQt::app()->exec ? "not ok\n" : "ok 3\n";