Cleanup
tests/test.lisp
Fri Jul 24 15:39:55 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Cleanup
--- old-commonqt/tests/test.lisp 2014-10-30 07:09:15.000000000 +0100
+++ new-commonqt/tests/test.lisp 2014-10-30 07:09:15.000000000 +0100
@@ -1,3 +1,30 @@
+;;; Copyright (C) 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
+;;;
+;;; This program is free software: you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation, either version 3 of the License, or
+;;; (at your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;;
+;;; As a special exception, the copyright holders of this library give you
+;;; permission to link this library with independent modules to produce an
+;;; executable, regardless of the license terms of these independent
+;;; modules, and to copy and distribute the resulting executable under
+;;; terms of your choice, provided that you also meet, for each linked
+;;; independent module, the terms and conditions of the license of that
+;;; module. An independent module is a module which is not derived from or
+;;; based on this library. If you modify this library, you may extend this
+;;; exception to your version of the library, but you are not obligated to
+;;; do so. If you do not wish to do so, delete this exception statement
+;;; from your version.
+
(eval-when (:compile-toplevel :load-toplevel)
(mb:load :FiveAM))
@@ -7,10 +34,12 @@
(5am:in-suite :cl-smoke.commonqt-suite)
(5am:test static-call
+ "Test static method call."
(5am:is (string= (cl-smoke.qt:q-version)
(#_qVersion "GlobalSpace"))))
(5am:test enum
+ "Test enum access."
(5am:is (enum= cl-smoke.qt:+blue+
(#_blue "Qt")))
(5am:is (enum= cl-smoke.qt:font.+bold+
@@ -19,10 +48,12 @@
(#_Key_Enter "Qt"))))
(5am:test new
+ "Test allocating with #_new."
(5am:is (cxx:= (make-instance 'cl-smoke.qt:byte-array :args '("foobar"))
(#_new QByteArray "foobar"))))
(5am:test call
+ "Test #_ method calling."
(let ((byte-array (make-instance 'cl-smoke.qt:byte-array :args '("foobar"))))
(5am:is (string= (cxx:data byte-array)
(#_data byte-array)))))
@@ -50,6 +81,7 @@
(#_text button))))))
(5am:test overriding
+ "Test overriding a virtual method."
(cl-smoke.qt:with-app ()
(let ((button (make-instance 'button)))
(5am:is (eql nil (button-meta-object-called button)))
@@ -70,6 +102,7 @@
(new instance))
(5am:test signal-slot
+ "Test signal to slot connection."
(let ((mumble (make-instance 'mumble)))
(5am:is (eql t
(#_connect "QObject"
@@ -83,6 +116,7 @@
(#_className (#_superClass (#_metaObject mumble)))))))
(5am:test (signal-signal :depends-on signal-slot)
+ "Test signal to signal connection."
(let ((mumble (make-instance 'mumble)))
(5am:is (eql t
(#_connect "QObject"
@@ -97,12 +131,21 @@
(5am:is (eql t (mumble-called mumble)))))
(5am:test make-qapplication
+ "Test QApplication creation with QT:MAKE-QAPPLICATION."
(let ((application (make-qapplication)))
(5am:is (eql (#_instance "QCoreApplication")
application))
(5am:is (eql t (typep application 'cl-smoke.qt:application)))
(smoke:delete-object application)))
-
+
+(5am:test noops
+ (qt:ensure-smoke)
+ (qt:enable-syntax))
+
+(5am:test docu
+ (qapropos "QObject")
+ (qdescribe "QObject"))
+
(eval-when (:load-toplevel)
(let ((results (5am:run :cl-smoke.commonqt-suite)))
(5am:explain! results)