repos
/
qt.tests
/ annotate_shade
summary
|
shortlog
|
log
|
tree
|
commit
|
commitdiff
|
headdiff
|
annotate
|
headblob
|
headfilediff
|
filehistory
normal
|
plain
|
shade
|
zebra
Test setf value for variant, nil variant & operator conversion,
Annotate for file src/variant.lisp
2009-04-02 tobias
1
(in-package :qt.tests)
22:17:02 '
2
'
3
(5am:in-suite :qt.suite)
'
4
'
5
(5am:test (variant-string :depends-on qstring)
'
6
"Test qt:variant <-> string conversion."
2009-07-01 tobias
7
; (5am:for-all ((string (5am:gen-string)))
2009-04-02 tobias
8
(5am:for-all ((string (5am:gen-one-element "foo"
2009-07-01 tobias
9
"Foo Bar")))
2009-05-11 tobias
10
(5am:is (eq t (cxx:= string (qt:make-variant string))))
14:17:41 '
11
(5am:is (string= string (qt:value (qt:make-variant string))))))
2009-04-02 tobias
12
22:17:02 '
13
(5am:test variant-int
'
14
"Test qt:variant <-> string conversion."
'
15
(5am:for-all ((integer (5am:gen-integer)))
2009-05-11 tobias
16
(5am:is (eq t (cxx:= integer (qt:make-variant integer))))
14:17:41 '
17
(5am:is (= integer (qt:value (qt:make-variant integer))))))
2009-04-02 tobias
18
22:17:02 '
19
(5am:test lisp-variant
'
20
"Test qt:variant <-> lisp object conversion."
'
21
(5am:for-all ((object (5am:gen-one-element #(1 2 3)
'
22
(list "foo" "bar"))))
2009-05-11 tobias
23
(5am:is (eq object (qt:value (qt:make-lisp-variant object))))))
2009-04-02 tobias
24
2009-05-11 tobias
25
(5am:test variant-color
14:18:40 '
26
"The C++ overload resolution for QColor:operator QVariant()."
'
27
(let* ((color (make-instance 'qt:color))
'
28
(variant1 (qt:make-variant color))
'
29
(variant2 (qt:make-variant color)))
'
30
(5am:is (eq t (cxx:= variant1 variant2)))))
'
31
'
32
(5am:test nil-variant
'
33
"Make a nil variant."
'
34
(5am:is (eq nil (qt:variant-boundp (qt:make-variant)))))
'
35
'
36
(5am:test setf-variant-value
'
37
"Set a qt:variant."
'
38
(let ((variant (qt:make-variant)))
'
39
(5am:is (= 1 (setf (qt:value variant) 1)))
'
40
(5am:is (= 1 (qt:value variant)))))
'
41