Mon Jan 25 22:13:40 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Test QGraphicsScene::setItem
hunk ./cl-smoke.qt.tests.asd 18
+ (:file "graphics-item" :depends-on ("tests"))
addfile ./src/graphics-item.lisp
hunk ./src/graphics-item.lisp 1
+(in-package :qt.tests)
+
+(5am:in-suite :qt.suite)
+
+(5am:test set-graphics-item
+ "Ownership transfer for QGraphicsScene::setItem."
+ (qt:with-app ()
+ (let ((scene (make-instance 'qt:graphics-scene)))
+ (let ((item (make-instance 'qt:graphics-item)))
+ (cxx:set-tool-tip item "Foo")
+ (cxx:add-item scene item))
+ (tg:gc :full t)
+ (tg:gc :full t)
+ (5am:is (= 1 (length (cxx:items scene))))
+ (5am:is (string= "Foo"
+ (cxx:tool-tip (elt (cxx:items scene) 0))))
+ ;; FIXME delete QGraphicsScene before the QApplication is deleted
+ (smoke::delete-object scene))))