X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Floop.pure.lisp;h=95933d4d5ac8cd99b7294d4a0a3b6fc5cc0d7f34;hb=df679ed627975948b1cee190f4d79c397588c43e;hp=278fa4c5c60bf2440bd8786211462b6f3e7ee964;hpb=cb4f56b0581f77e20a7d8cb593891c7bd919c3e9;p=sbcl.git diff --git a/tests/loop.pure.lisp b/tests/loop.pure.lisp index 278fa4c..95933d4 100644 --- a/tests/loop.pure.lisp +++ b/tests/loop.pure.lisp @@ -171,3 +171,11 @@ collect it and collect it) '(a z b z c z d z)))) + +(let ((ht (make-hash-table))) + (setf (gethash 1 ht) 3) + (setf (gethash 7 ht) 15) + (assert (= (loop for v fixnum being each hash-key in ht sum v) 8)) + (assert (= (loop for v fixnum being each hash-value in ht sum v) 18)) + (assert (raises-error? (loop for v float being each hash-value in ht sum v) + type-error)))