Commit 800faabc authored by Robert Goldman's avatar Robert Goldman
Browse files

Fix tests for copy-hash-table and test=.

A current Allegro beta gives different values for these tests that
seem acceptable according to the CL ANSI Spec.

Specifically:

- the `hash-table-size` of a hash-table copy is not always equal to
the size of the original hash-table, but this seems to be permitted by
the spec. Gitlab issue #30.

- Allegro gives a `program-error` in one case where the tests expect a
`type-error`. GitLab issue #31.

- Allegro is more sure about a `subtypep` query than some other lisps
in a way that seems permissible.  GitLab issue #32.
parent 23d439a7
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -283,7 +283,7 @@
            (eql-copy (copy-hash-table orig :test 'eql))
            (equal-copy (copy-hash-table orig :test 'equal))
            (equalp-copy (copy-hash-table orig :test 'equalp)))
        (list (eql (hash-table-size eq-copy) (hash-table-size orig))
        (list #-allegro (eql (hash-table-size eq-copy) (hash-table-size orig))
              (eql (hash-table-rehash-size eq-copy)
                   (hash-table-rehash-size orig))
              (hash-table-count eql-copy)
@@ -293,7 +293,7 @@
              (gethash (copy-seq foo) equal-copy)
              (gethash "FOO" equal-copy)
              (gethash "FOO" equalp-copy))))
  (t t 2 t nil t t nil t))
  (#-allegro t t 2 t nil t t nil t))

(deftest copy-hash-table.2
    (let ((ht (make-hash-table))
@@ -1605,8 +1605,13 @@
        (let ((stream (make-broadcast-stream)))
          (read-stream-content-into-byte-vector stream :initial-size 0))
      (type-error ()
        :type-error))
        :type-error)
      (program-error ()
        :program-error))
  #-allegro
  :type-error
  #+allegro
  :program-error)

;;;; Macros

@@ -1789,8 +1794,7 @@
  t)

(deftest type=.4
    (type= 'string '(satisfies emptyp))
  nil
    (nth-value 0 (type= 'string '(satisfies emptyp)))
  nil)

(deftest type=.5