Test setf value for variant, nil variant & operator conversion,
Mon May 11 16:18:40 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Test setf value for variant, nil variant & operator conversion,
diff -rN -u old-qt.tests/qt.tests.mbd new-qt.tests/qt.tests.mbd
--- old-qt.tests/qt.tests.mbd 2014-10-30 07:03:21.000000000 +0100
+++ new-qt.tests/qt.tests.mbd 2014-10-30 07:03:21.000000000 +0100
@@ -9,17 +9,18 @@
(:license "GPL with linking exception")
(:needs :qt :qt.test :FiveAM :trivial-garbage)
(:components
- ("src" module
- (:components "package"
- ("tests" (:needs "package"))
- ("qbytearray" (:needs "tests"))
- ("qstring" (:needs "tests"))
- ("overload" (:needs "tests"))
- ("gc" (:needs "tests"))
- ("variant" (:needs "tests"))
- ("application" (:needs "tests"))
- ("signal-slot" (:needs "tests"))
- ("operators" (:needs "tests"))
- ("thread" (:needs "tests"))
- ("properties" (:needs "tests"))
- ("click" (:needs "tests"))))))
+ ("src" module
+ (:components
+ "package"
+ ("tests" (:needs "package"))
+ ("qbytearray" (:needs "tests"))
+ ("qstring" (:needs "tests"))
+ ("overload" (:needs "tests"))
+ ("gc" (:needs "tests"))
+ ("variant" (:needs "tests"))
+ ("application" (:needs "tests"))
+ ("signal-slot" (:needs "tests"))
+ ("operators" (:needs "tests"))
+ ("thread" (:needs "tests"))
+ ("properties" (:needs "tests"))
+ ("click" (:needs "tests"))))))
diff -rN -u old-qt.tests/src/variant.lisp new-qt.tests/src/variant.lisp
--- old-qt.tests/src/variant.lisp 2014-10-30 07:03:21.000000000 +0100
+++ new-qt.tests/src/variant.lisp 2014-10-30 07:03:21.000000000 +0100
@@ -22,3 +22,20 @@
(list "foo" "bar"))))
(5am:is (eq object (qt:value (qt:make-lisp-variant object))))))
+
+(5am:test variant-color
+ "The C++ overload resolution for QColor:operator QVariant()."
+ (let* ((color (make-instance 'qt:color))
+ (variant1 (qt:make-variant color))
+ (variant2 (qt:make-variant color)))
+ (5am:is (eq t (cxx:= variant1 variant2)))))
+
+(5am:test nil-variant
+ "Make a nil variant."
+ (5am:is (eq nil (qt:variant-boundp (qt:make-variant)))))
+
+(5am:test setf-variant-value
+ "Set a qt:variant."
+ (let ((variant (qt:make-variant)))
+ (5am:is (= 1 (setf (qt:value variant) 1)))
+ (5am:is (= 1 (qt:value variant)))))