Sat Apr 3 21:13:24 CEST 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Test static member variable access using slot-value with a class object.
hunk ./src/properties.lisp 43
+ (5am:is (slot-boundp (find-class 'qt:object) :static-meta-object))
hunk ./src/properties.lisp 47
+ (5am:is (string= "QObject"
+ (cxx:class-name
+ (slot-value (find-class 'qt:object)
+ :static-meta-object))))
Sat Apr 3 14:52:50 CEST 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Test slot-value for C++ attributes.
hunk ./src/properties.lisp 39
+(5am:test attributes
+ "Test C++ attribute access with slot-* functions."
+ (let ((o (make-instance 'qt:object)))
+ (5am:is (slot-boundp o :static-meta-object))
+ (5am:is (string= "QObject"
+ (cxx:class-name
+ (slot-value o :static-meta-object))))
+ (5am:signals error
+ (setf (slot-value o :static-meta-object)
+ (cffi:null-pointer))))
+ (let ((data (make-instance 'qt:shared-data)))
+ (5am:is (slot-boundp data :ref))
+ (5am:for-all ((value (5am:gen-integer :min -255 :max 255)))
+ (setf (slot-value data :ref) value)
+ (5am:is (cxx:= (slot-value data :ref) value)))))
+
Sat Apr 3 14:50:36 CEST 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Test qt.opengl conversions.
hunk ./cl-smoke.qt.tests.asd 7
- :depends-on (:cl-smoke.qt.test :cl-smoke.qt.gui :FiveAM :trivial-garbage :cl-smoke.smoke)
+ :depends-on (:cl-smoke.qt.test :cl-smoke.qt.gui :cl-smoke.qt.opengl
+ :FiveAM :trivial-garbage :cl-smoke.smoke)
hunk ./cl-smoke.qt.tests.asd 21
+ (:file "opengl" :depends-on ("tests"))
addfile ./src/opengl.lisp
hunk ./src/opengl.lisp 1
+(in-package :qt.tests)
+
+(5am:in-suite :qt.suite)
+
+(5am:test gluint
+ "GLuint conversion"
+ (qt:with-app ()
+ (let* ((texture (make-instance 'qt:pixmap))
+ (gl-widget (make-instance 'qt:glwidget))
+ (id (cxx:bind-texture gl-widget texture)))
+ (5am:is (typep id '(integer 0)))
+ (cxx:delete-texture gl-widget id))))
+ [_$_]
+
+(5am:test glint
+ "Test GLint and GLenum conversion."
+ (qt:with-app ()
+ (let* ((texture (make-instance 'qt:pixmap))
+ (target 3553) ;(cffi:foreign-enum-value '%gl:enum :texture-2d))
+ (format 6409) ;(cffi:foreign-enum-value '%gl:enum :rgba))
+ (gl-widget (make-instance 'qt:glwidget))
+ (id (cxx:bind-texture gl-widget texture target format)))
+ (5am:is (typep id '(integer 0)))
+ (cxx:delete-texture gl-widget id))))
Sat Feb 20 22:06:45 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Test (qt:value (qt:make-variant qt:+green+))
hunk ./src/variant.lisp 57
+(5am:test variant-color
+ "Test QColor variant."
+ (let ((color (make-instance 'qt:color :arg0 qt:+green+)))
+ (5am:is (string= (cxx:name color)
+ (cxx:name (qt:value (qt:make-variant color)))))))
+
Sat Feb 20 19:06:27 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Test overload resolution exact match for long and ulong.
hunk ./src/package.lisp 2
- (:use :cl :trivial-garbage :bordeaux-threads)
+ (:use :cl :trivial-garbage :bordeaux-threads :cxx-support)
hunk ./src/variant.lisp 49
+(5am:test exact-int-type-match
+ "Test overload resolution exact match long vs. int."
+ (5am:is (enum= qt:variant.+uint+
+ (cxx:type (qt:make-variant 1))))
+ (5am:is (enum= qt:variant.+int+
+ (cxx:type (qt:make-variant -1)))))
+ ;; on 32 bit sizeof(long) == sizeof(int) thus not test for that.
+
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))))
Mon Jan 25 19:51:13 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Test QList translation
hunk ./cl-smoke.qt.tests.asd 17
+ (:file "qlist" :depends-on ("tests"))
addfile ./src/qlist.lisp
hunk ./src/qlist.lisp 1
+(in-package :qt.tests)
+
+(5am:in-suite :qt.suite)
+
+(5am:test variant-list
+ "QList<Variant>"
+ (let ((variants (vector (qt:make-variant "foo"))))
+ (5am:is (every #'cxx:=
+ variants
+ (cxx:to-list (qt:make-variant variants))))))
+ [_$_]