initial import
Annotate for file src/properties.lisp
2009-04-02 tobias 1 (in-package :qt.tests)
22:17:02 ' 2
' 3 (5am:in-suite :qt.suite)
' 4
' 5 ;(5am:test property-list
' 6 ; "Test properties"
' 7 ; (5am:is (= 0 (length (qt:class-properties (find-class 'qt:object)))))
' 8 ; (5am:is (= 1 (length (qt:properties (make-instance 'qt:object))))))
' 9
' 10 (5am:test (property :depends-on qstring)
' 11 "Tests get and set property string"
' 12 (let ((o (make-instance 'qt:object)))
' 13 (5am:is (eql t (qt:property-p o "objectName")))
' 14 (5am:is (eql t (qt:property-p o 'object-name)))
' 15
' 16 (setf (qt:property o 'object-name) "fooBar")
' 17 (5am:is (string= (qt:property o 'object-name) "fooBar"))
' 18 (5am:is (string= (qt:property o "objectName") "fooBar"))
' 19
' 20 (5am:is (eql nil (qt:property-p o 'foo)))
' 21 (setf (qt:property o 'foo) "bar")
' 22 (5am:is (eql t (qt:property-p o 'foo)))
' 23 (5am:is (string= (qt:property o 'foo) "bar"))))
' 24
' 25
' 26 (5am:test property-int
' 27 "Test get and set property integer"
' 28 (let ((o (make-instance 'qt:object)))
' 29 (5am:for-all ((integer (5am:gen-integer)))
' 30 (setf (qt:property o 'foo-bar) integer)
' 31 (5am:is (= integer (qt:property o 'foo-bar))))))