:qt.test stuff is in :qt --> to head
Sat Apr 3 19:17:59 CEST 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Replace mudballs with asdf and support the modular smoke.
hunk ./kde.tests.mbd 1
-;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
-
-(in-package :sysdef-user)
-
-(define-system :kde.tests ()
- (:version 0 0 1)
- (:documentation "KDE unit tests.")
- (:author "Tobias Rautenkranz")
- (:license "GPL with linking exception")
- (:needs :kde :FiveAM :qt.test)
- (:components [_$_]
- ("src" module
- (:components "package"
- ("tests" (:needs "package"))
- ("click" (:needs "tests"))))))
rmfile ./kde.tests.mbd
hunk ./src/click.lisp 1
-(in-package :kde.tests)
+(in-package :cl-smoke.kde.tests)
hunk ./src/package.lisp 1
-(defpackage :kde.tests
+(defpackage :cl-smoke.kde.tests
hunk ./src/tests.lisp 1
-(in-package :kde.tests)
+(in-package :cl-smoke.kde.tests)
addfile ./test.lisp
hunk ./test.lisp 1
+#|
+exec -a "$0" sbcl --noinform --noprint --disable-debugger --load $0 --end-toplevel-options "$@"
+# Used for testing on darcs record.
+|#
+
+(asdf:operate 'asdf:load-op :cl-smoke.kde.tests)
+(asdf:operate 'asdf:test-op :cl-smoke.kde.tests)
+
+(sb-ext:quit)
changepref test
sh test.lisp
Sun Sep 13 22:22:44 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Work around missing overload
hunk ./src/click.lisp 21
- (qt:test.mouse-click widget qt:+left-button+)
+ (qt:test.mouse-click widget qt:+left-button+
+ 0 (make-instance 'qt:point) -1)
Mon Jul 27 21:28:28 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Test ownership transfer of qt:connect to a no Smoke QObject instance.
hunk ./src/click.lisp 11
- (kde::with-kde ("hello" "hello-world" "0.0.1")
- (let ((widget (make-instance 'my-widget))
- (click-count 0))
- (qt:connect (qt:get-signal widget "clicked()")
- #'(lambda ()
- (incf click-count)))
- [_$_]
- (cxx:set-text widget "Click Me")
+ (kde:with-kde ("hello" "hello-world" "0.0.1")
+ (let ((widget (make-instance 'my-widget))
+ (click-count 0))
+ (qt:connect (qt:get-signal widget "clicked()")
+ #'(lambda ()
+ (incf click-count)))
+ [_$_]
+ (cxx:set-text widget "Click Me")
hunk ./src/click.lisp 20
- (5am:is (= 0 click-count))
- (qt:test.mouse-click widget qt:+left-button+)
- (5am:is (= 1 click-count)))))
+ (5am:is (= 0 click-count))
+ (qt:test.mouse-click widget qt:+left-button+)
+ (5am:is (= 1 click-count)))))
hunk ./src/tests.lisp 9
- (5am:explain! results)
- (unless (5am:results-status results)
- (error "Testsuite :kde.suite failed."))))
+ (5am:explain! results)
+ (unless (5am:results-status results)
+ (error "Testsuite :kde.suite failed."))))
+
+(5am:test connect-to-non-smoke-qobject
+ "Test ownership transfer to a no Smoke QObject instance."
+ (kde:with-kde ("test" "test" "1")
+ (let* ((window (make-instance 'kde:push-button))
+ (action-collection (make-instance 'kde:action-collection
+ :arg0 window))
+ (counter 0)
+ (action (kde:make-standard-action kde:standard-action.+open+
+ action-collection
+ #'(lambda () (incf counter)))))
+ (tg:gc :full t)
+ (tg:gc :full t)
+ (5am:is (= 0 counter))
+ (cxx:activate action qt:action.+trigger+)
+ (5am:is (= 1 counter)))))
+ [_$_]
Thu Jun 11 21:07:08 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Signal error on test failture
hunk ./src/tests.lisp 9
- (5am:explain! results)
- (5am:results-status results)))
+ (5am:explain! results)
+ (unless (5am:results-status results)
+ (error "Testsuite :kde.suite failed."))))
Thu Jun 11 21:01:21 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* smoke-wrapper-class in now cxx:class
hunk ./src/click.lisp 7
- (:metaclass smoke::smoke-wrapper-class))
+ (:metaclass cxx:class))
hunk ./src/click.lisp 14
- (qt:connect-function widget "clicked()"
- #'(lambda ()
- (incf click-count)))
+ (qt:connect (qt:get-signal widget "clicked()")
+ #'(lambda ()
+ (incf click-count)))
Thu Jun 11 20:58:02 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* :qt.test stuff is in :qt
hunk ./src/click.lisp 21
- (qt.test:test.mouse-click widget qt:+left-button+)
+ (qt:test.mouse-click widget qt:+left-button+)