X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Falien.impure.lisp;h=6637dba7fb5f4ef24aad96ce962de66ae7c6dd55;hb=cf49f2d086069a9c1b57f501df9a6a0bd3a34c3c;hp=aa6eee6aba323dabdaf229d1cc4e850deb0cfdf3;hpb=4e7866afc56e4eec4e33dc2d61bd4f0aeed72cfd;p=sbcl.git diff --git a/tests/alien.impure.lisp b/tests/alien.impure.lisp index aa6eee6..6637dba 100644 --- a/tests/alien.impure.lisp +++ b/tests/alien.impure.lisp @@ -204,7 +204,7 @@ :ok))))) ;;; Unused local alien caused a compiler error -(with-test (:name unused-local-alien) +(with-test (:name :unused-local-alien) (let ((fun `(lambda () (sb-alien:with-alien ((alien1923 (array (sb-alien:unsigned 8) 72))) (values))))) @@ -247,8 +247,11 @@ ;;; void conflicted with derived type (declaim (inline bug-316075)) +#-win32 ;kludge: This reader conditional masks a bug, but allows the test + ;to fail cleanly. (sb-alien:define-alien-routine bug-316075 void (result char :out)) -(with-test (:name bug-316075) +(with-test (:name :bug-316075 :fails-on :win32) + #+win32 (error "fail") (handler-bind ((warning #'error)) (compile nil '(lambda () (multiple-value-list (bug-316075)))))) @@ -264,7 +267,7 @@ ((foo (unsigned 32))) foo) -(with-test (:name bug-316325 :skipped-on '(not (or :x86-64 :x86))) +(with-test (:name :bug-316325 :skipped-on '(not (or :x86-64 :x86))) ;; This test works by defining a callback function that provides an ;; identity transform over a full-width machine word, then calling ;; it as if it returned a narrower type and checking to see if any @@ -306,7 +309,7 @@ (compiler-note (n) (error "bad note: ~A" n)))) -(with-test (:name :bug-721087) +(with-test (:name :bug-721087 :fails-on :win32) (assert (typep nil '(alien c-string))) (assert (not (typep nil '(alien (c-string :not-null t))))) (assert (eq :ok @@ -348,7 +351,13 @@ (assert (eq :multibyte-4 (handler-case - (let ((c-string (coerce #(70 111 246 0) + ;; KLUDGE, sort of. + ;; + ;; C-STRING decoding doesn't know how long the string is, and since this + ;; looks like a 4-byte sequence, it will grab 4 octets off the end. + ;; + ;; So we pad the vector for safety's sake. + (let ((c-string (coerce #(70 111 246 0 0 0) '(vector (unsigned-byte 8))))) (sb-sys:with-pinned-objects (c-string) (sb-alien::c-string-to-string (sb-sys:vector-sap c-string)