(defun run-tests (&key ((:compiled *compile-tests*)))
(do-tests))
+(defun hash-table-test-name (name)
+ ;; Workaround for Clisp calling EQL in a hash-table FASTHASH-EQL.
+ (hash-table-test (make-hash-table :test name)))
+
;;;; Arrays
(deftest copy-array.1
(= 42 (gethash x table)))))))
t)
-#+clisp (pushnew 'copy-hash-table.1 *expected-failures*)
-
(deftest copy-hash-table.1
(let ((orig (make-hash-table :test 'eq :size 123))
(foo "foo"))
(let ((eq-copy (copy-hash-table orig))
(eql-copy (copy-hash-table orig :test 'eql))
(equal-copy (copy-hash-table orig :test 'equal))
- ;; CLISP overflows the stack with this bit.
- ;; See <http://sourceforge.net/tracker/index.php?func=detail&aid=2029069&group_id=1355&atid=101355>.
- #-clisp (equalp-copy (copy-hash-table orig :test 'equalp)))
+ (equalp-copy (copy-hash-table orig :test 'equalp)))
(list (eql (hash-table-size eq-copy) (hash-table-size orig))
(eql (hash-table-rehash-size eq-copy)
(hash-table-rehash-size orig))
(gethash foo eql-copy)
(gethash (copy-seq foo) equal-copy)
(gethash "FOO" equal-copy)
- #-clisp (gethash "FOO" equalp-copy))))
+ (gethash "FOO" equalp-copy))))
(t t 2 t nil t t nil t))
(deftest copy-hash-table.2
(getf plist nil))))
(20 0 -2 -7 nil))
-#+clisp (pushnew 'alist-hash-table.1 *expected-failures*)
-
(deftest alist-hash-table.1
(let* ((alist '((0 a) (1 b) (2 c)))
(table (alist-hash-table alist)))
(gethash 0 table)
(gethash 1 table)
(gethash 2 table)
- (hash-table-test table))) ; CLISP returns EXT:FASTHASH-EQL.
- (3 (a) (b) (c) eql))
-
-#+clisp (pushnew 'plist-hash-table.1 *expected-failures*)
+ (eq (hash-table-test-name 'eql)
+ (hash-table-test table))))
+ (3 (a) (b) (c) t))
(deftest plist-hash-table.1
(let* ((plist '(:a 1 :b 2 :c 3))
(gethash :c table)
(gethash 2 table)
(gethash nil table)
- (hash-table-test table))) ; CLISP returns EXT:FASTHASH-EQ.
- (3 1 2 3 nil nil eq))
+ (eq (hash-table-test-name 'eq)
+ (hash-table-test table))))
+ (3 1 2 3 nil nil t))
;;;; Functions
(member v (list v.vector v.list v.string))
(equal l.list l)
(equalp l.vector #(1 2 3))
- (eql (upgraded-array-element-type 'fixnum)
- (array-element-type l.spec-v))
+ (type= (upgraded-array-element-type 'fixnum)
+ (array-element-type l.spec-v))
(equalp v.vector v)
(equal v.list '(#\a #\b #\c))
(equal "abc" v.string))))