initial import
src/application.lisp
Fri Apr 3 00:17:02 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* initial import
--- old-qt.tests/src/application.lisp 1970-01-01 01:00:00.000000000 +0100
+++ new-qt.tests/src/application.lisp 2014-10-30 07:59:38.000000000 +0100
@@ -0,0 +1,26 @@
+(in-package :qt.tests)
+
+(5am:in-suite :qt.suite)
+
+(5am:test with-app
+ "Tests qt:with-app and qt:with-core-app"
+ (5am:for-all ((core-p (5am:gen-one-element nil t)))
+ (5am:is (eql nil (qt:app-p)))
+ (if core-p
+ (qt:with-core-app
+ (5am:is (eql t (qt:app-p)))
+ (5am:is (typep (qt:app) (find-class 'qt:core-application)))
+ (cxx:set-object-name (qt:app) "core-app")) ;; test for memfault
+ (qt:with-app
+ (5am:is (eql t (qt:app-p)))
+ (5am:is (typep (qt:app) (find-class 'qt:application)))
+ (cxx:set-object-name (qt:app) "app")))
+ (5am:is (eql nil (qt:app-p)))))
+
+(5am:test application-nest
+ "Test qt:with-core-app nesting."
+ (qt:with-core-app
+ (5am:is (eql (qt:app) (qt:core-application.instance)))
+ (qt:with-core-app
+ (5am:is (eql (qt:app) (qt:core-application.instance))))))
+