Test #'QT:GET-SLOT for function with this argument.
Fri Jun 5 09:52:01 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Test #'QT:GET-SLOT for function with this argument.
diff -rN -u old-qt.tests/src/click.lisp new-qt.tests/src/click.lisp
--- old-qt.tests/src/click.lisp 2014-10-30 07:02:59.000000000 +0100
+++ new-qt.tests/src/click.lisp 2014-10-30 07:02:59.000000000 +0100
@@ -40,5 +40,19 @@
(qt.test:test.mouse-click widget qt:+left-button+)
(5am:is (= 2 click-count)))))
-
-
+(5am:test (click-test-bool-this :depends-on click-test)
+ "Test clicking a button (bool argument) for a function with this argument."
+ (qt:with-app
+ (let ((widget (make-instance 'click-test-widget))
+ (click-count 0))
+ (qt:connect (qt:get-signal widget "clicked(bool)")
+ (qt:get-slot widget
+ #'(lambda (object checked)
+ (5am:is (eq nil checked))
+ (5am:is (eq widget object))
+ (incf click-count))))
+ (5am:is (= 0 click-count))
+ (qt.test:test.mouse-click widget qt:+left-button+)
+ (5am:is (= 1 click-count))
+ (qt.test:test.mouse-click widget qt:+left-button+)
+ (5am:is (= 2 click-count)))))