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.
hunk ./src/click.lisp 43
-
-
+(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)))))