3 (5am:in-suite :qt.suite)
5 (5am:test null-bytearray
6 "Test empty QByteArray."
7 (5am:is (string= "" (cxx:data (make-instance 'qt:byte-array)))))
10 "Test string <-> QByteArray."
11 (5am:for-all ((string (5am:gen-one-element "" "Foo" "bar" "öäü" "1234")))
12 (5am:is (string= string
13 (cxx:data (make-instance 'qt:byte-array
15 #-openmcl ;; FIXME utf-8 problems with Clozure cl?
16 (5am:for-all ((string (5am:gen-string)))
17 (5am:is (string= string
18 (cxx:data (make-instance 'qt:byte-array
21 (5am:test const-bytearray
22 "Test const QByteArray."
23 ;; Const operator[] returns a char, but the non const version a QByteRef.
24 ;; Using this to test constnes overload resolution.
25 (let ((const-array (qt:operator+ (make-instance 'qt:byte-array :arg0 "a")
26 (make-instance 'qt:byte-array :arg0 "b"))))
27 (5am:is (typep (cxx:operator[] (make-instance 'qt:byte-array :arg0 "a") 0)
29 (5am:is (eql #\a (cxx:operator[] const-array 0)))))