X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fload.impure.lisp;h=ee43f50411f11b4a9da3804107ec3f84a2f7d383;hb=062283b901155792f65775491aea51481c56faaa;hp=972a609596b001d3fa6846961f88e13f68b9d3c7;hpb=219457dafac6f2df2c53c1fb7de3971305a4bd50;p=sbcl.git diff --git a/tests/load.impure.lisp b/tests/load.impure.lisp index 972a609..ee43f50 100644 --- a/tests/load.impure.lisp +++ b/tests/load.impure.lisp @@ -307,10 +307,10 @@ (error () nil))) (ignore-errors (delete-file pathname))))) -(with-test (:name (load "empty.lisp")) +(with-test (:name (load :empty.lisp)) (assert (load-empty-file "lisp"))) -(with-test (:name (load "empty.fasl")) +(with-test (:name (load :empty.fasl)) (assert (not (load-empty-file "fasl")))) (with-test (:name :parallel-fasl-load) @@ -358,3 +358,61 @@ (test-it))))) (when fasl (ignore-errors (delete-file fasl)))))) + +(defvar *pack*) +#+sb-simd-pack +(with-test (:name :load-simd-pack-int) + (with-open-file (s *tmp-filename* + :direction :output + :if-exists :supersede + :if-does-not-exist :create) + (print '(setq *pack* (sb-kernel:%make-simd-pack-ub64 2 4)) s)) + (let (tmp-fasl) + (unwind-protect + (progn + (setq tmp-fasl (compile-file *tmp-filename*)) + (let ((*pack* nil)) + (load tmp-fasl) + (assert (typep *pack* '(sb-kernel:simd-pack integer))) + (assert (= 2 (sb-kernel:%simd-pack-low *pack*))) + (assert (= 4 (sb-kernel:%simd-pack-high *pack*))))) + (when tmp-fasl (delete-file tmp-fasl)) + (delete-file *tmp-filename*)))) + +#+sb-simd-pack +(with-test (:name :load-simd-pack-single) + (with-open-file (s *tmp-filename* + :direction :output + :if-exists :supersede + :if-does-not-exist :create) + (print '(setq *pack* (sb-kernel:%make-simd-pack-single 1f0 2f0 3f0 4f0)) s)) + (let (tmp-fasl) + (unwind-protect + (progn + (setq tmp-fasl (compile-file *tmp-filename*)) + (let ((*pack* nil)) + (load tmp-fasl) + (assert (typep *pack* '(sb-kernel:simd-pack single-float))) + (assert (equal (multiple-value-list (sb-kernel:%simd-pack-singles *pack*)) + '(1f0 2f0 3f0 4f0))))) + (when tmp-fasl (delete-file tmp-fasl)) + (delete-file *tmp-filename*)))) + +#+sb-simd-pack +(with-test (:name :load-simd-pack-double) + (with-open-file (s *tmp-filename* + :direction :output + :if-exists :supersede + :if-does-not-exist :create) + (print '(setq *pack* (sb-kernel:%make-simd-pack-double 1d0 2d0)) s)) + (let (tmp-fasl) + (unwind-protect + (progn + (setq tmp-fasl (compile-file *tmp-filename*)) + (let ((*pack* nil)) + (load tmp-fasl) + (assert (typep *pack* '(sb-kernel:simd-pack double-float))) + (assert (equal (multiple-value-list (sb-kernel:%simd-pack-doubles *pack*)) + '(1d0 2d0))))) + (when tmp-fasl (delete-file tmp-fasl)) + (delete-file *tmp-filename*))))