[alexandria.git] updated branch master: a8fa399 adjust tests

Nikodemus Siivola nsiivola at common-lisp.net
Sun Apr 22 16:40:31 UTC 2012


The branch master has been updated:
       via  a8fa399482c548f6a8c2b517e0c30c921dc55890 (commit)
      from  49555427d8019a56132def9a4440663c66339131 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a8fa399482c548f6a8c2b517e0c30c921dc55890
Author: Nikodemus Siivola <nikodemus at random-state.net>
Date:   Sun Apr 22 19:33:51 2012 +0300

    adjust tests
    
      Workarounds for the Clisp and CMUCL failures.
    
      Newer Clisp's no longer have the stack-overflow for the hash-table test, so
      enable it too.

-----------------------------------------------------------------------

Summary of changes:
 tests.lisp |   30 ++++++++++++++----------------
 1 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/tests.lisp b/tests.lisp
index b875382..e07694d 100644
--- a/tests.lisp
+++ b/tests.lisp
@@ -10,6 +10,10 @@
 (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
@@ -250,8 +254,6 @@
                     (= 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"))
@@ -260,9 +262,7 @@
       (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))
@@ -272,7 +272,7 @@
               (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
@@ -351,8 +351,6 @@
               (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)))
@@ -360,10 +358,9 @@
             (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))
@@ -374,8 +371,9 @@
             (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
 
@@ -1285,8 +1283,8 @@
               (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))))
-- 
Alexandria hooks/post-receive




More information about the alexandria-cvs mailing list