Signal error on test failture --> to head
Sat Apr 3 19:17:59 CEST 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Replace mudballs with asdf and support the modular smoke.
Sun Sep 13 22:22:44 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Work around missing overload
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.
Thu Jun 11 21:07:08 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Signal error on test failture
diff -rN -u old-kde.tests/kde.tests.mbd new-kde.tests/kde.tests.mbd
--- old-kde.tests/kde.tests.mbd 2014-10-14 10:28:53.000000000 +0200
+++ new-kde.tests/kde.tests.mbd 1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-;;;; -*- 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"))))))
diff -rN -u old-kde.tests/src/click.lisp new-kde.tests/src/click.lisp
--- old-kde.tests/src/click.lisp 2014-10-14 10:28:53.000000000 +0200
+++ new-kde.tests/src/click.lisp 2014-10-14 10:28:54.000000000 +0200
@@ -1,4 +1,4 @@
-(in-package :kde.tests)
+(in-package :cl-smoke.kde.tests)
(5am:in-suite :kde.suite)
@@ -8,15 +8,16 @@
(5am:test click-test
"Test clicking a button."
- (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")
- (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+
+ 0 (make-instance 'qt:point) -1)
+ (5am:is (= 1 click-count)))))
diff -rN -u old-kde.tests/src/package.lisp new-kde.tests/src/package.lisp
--- old-kde.tests/src/package.lisp 2014-10-14 10:28:53.000000000 +0200
+++ new-kde.tests/src/package.lisp 2014-10-14 10:28:54.000000000 +0200
@@ -1,3 +1,3 @@
-(defpackage :kde.tests
+(defpackage :cl-smoke.kde.tests
(:use :cl)
(:export :run))
diff -rN -u old-kde.tests/src/tests.lisp new-kde.tests/src/tests.lisp
--- old-kde.tests/src/tests.lisp 2014-10-14 10:28:53.000000000 +0200
+++ new-kde.tests/src/tests.lisp 2014-10-14 10:28:54.000000000 +0200
@@ -1,4 +1,4 @@
-(in-package :kde.tests)
+(in-package :cl-smoke.kde.tests)
(5am:def-suite :kde.suite)
@@ -7,4 +7,22 @@
(defun run ()
(let ((results (5am:run :kde.suite)))
(5am:explain! results)
- (5am:results-status 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)))))
+
diff -rN -u old-kde.tests/test.lisp new-kde.tests/test.lisp
--- old-kde.tests/test.lisp 1970-01-01 01:00:00.000000000 +0100
+++ new-kde.tests/test.lisp 2014-10-14 10:28:54.000000000 +0200
@@ -0,0 +1,9 @@
+#|
+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)