Commit 43838026 authored by pfdietz's avatar pfdietz

Added note for result-type assumption (prompted by discussion with Haible);...

Added note for result-type assumption (prompted by discussion with Haible); fixed some test warnings.
parent b9c3b7d5
......@@ -312,6 +312,7 @@
t)
(deftest concatenate.error.6
:notes (:result-type-element-type-by-subtype)
(let ((type '(or (vector bit) (vector t))))
(if (subtypep type 'vector)
(eval `(signals-error-always (concatenate ',type '(0 1 0) '(1 1 0)) error))
......
......@@ -470,6 +470,7 @@
t t)
(deftest make-sequence.error.15
:notes (:result-type-element-type-by-subtype)
(if (subtypep '(or (vector bit) (vector t)) 'vector)
(signals-error (make-sequence '(or (vector bit) (vector t)) 10 :initial-element 0) type-error)
t)
......
......@@ -254,6 +254,7 @@
t)
(deftest map.error.10
:notes (:result-type-element-type-by-subtype)
(let ((type '(or (vector bit) (vector t))))
(if (subtypep type 'vector)
(eval `(signals-error-always (map ',type #'identity '(1 0 1)) error))
......@@ -384,7 +385,7 @@
for result = (map `(vector ,type) #'identity vals)
unless (and (= (length result) len)
(every #'eql vals result))
collect (list i vals result))
collect (list type vals result))
nil)
(deftest map.specialized-vector.7
......@@ -397,7 +398,7 @@
for result = (map `(vector ,type) #'identity vals)
unless (and (= (length result) len)
(every #'eql vals result))
collect (list i vals result))
collect (list type vals result))
nil)
;;; Order of evaluation tests
......
......@@ -18,7 +18,8 @@
"The standardized package nicknames specified in section 11 of ANSI CL are exclusive (disputed).")
(defnote :type-of/strict-builtins
"Interpret requirement 1.a on the TYPE-OF page to apply to all built-in types that contain the object, not just to some builtin type that contains the object.")
"Interpret requirement 1.a on the TYPE-OF page to apply to all built-in types that
contain the object, not just to some builtin type that contains the object.")
(defnote :assume-no-gray-streams
"Disable the test if gray streams are present.")
......@@ -32,4 +33,12 @@
#+sbcl (rt::disable-note :open-if-exists-new-version-no-error)
(defnote :negative-zero-is-similar-to-positive-zero
"The definition of similarity implies that -0.0 and 0.0 are similar (for each float type.) If negative zeros are distinct this is probably not good, since it makes (defconstant x 0.0) be nonportable.")
"The definition of similarity implies that -0.0 and 0.0 are similar (for each float type.)
If negative zeros are distinct this is probably not good, since it makes (defconstant x 0.0) be nonportable.")
(defnote :result-type-element-type-by-subtype
"Assume that (for sequence functions MAP, etc.) the element type of a vector result type
is defined to be the type X such that result-type is a subtype of (vector X).")
;;; Haible disagrees with :result-type-element-type-by-subtype
#+clisp (rt::disable-note :result-type-element-type-by-subtype)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment