Commit d1963397 authored by Michał Herda's avatar Michał Herda 🤔
Browse files

Annotate some LOOP tests with ANSI-SPEC-PROBLEM

This marks tests LOOP.1.{39,40,41,42,43} with :loop-iteration-values-in-finally
and :ansi-spec-problem to take into account that the values of iteration
variables in FINALLY are effectively undefined by the spec. This way,
testers can avoid running these test cases if they want to avoid testing
behaviour that is defined in contradictory manners.

Removal of these test cases should perhaps be considered in the future.

See for
parent ed4a6bd6
......@@ -201,26 +201,31 @@
;;; implementation will assign X an out-of-range value
;;; at the end.
(deftest loop.1.39
:notes (:loop-iteration-values-in-finally :ansi-spec-problem)
(loop for x of-type (integer 1 5) from 1 to 5 collect x)
(1 2 3 4 5))
;;; Test that the index variable achieves the inclusive
;;; upper bound, but does not exceed it.
(deftest loop.1.40
:notes (:loop-iteration-values-in-finally :ansi-spec-problem)
(loop for x from 1 to 5 do (progn) finally (return x))
;;; Test that the index variable acheives the exclusive
;;; upper bound, but does not exceed it.
(deftest loop.1.41
:notes (:loop-iteration-values-in-finally :ansi-spec-problem)
(loop for x from 1 below 5 do (progn) finally (return x))
(deftest loop.1.42
:notes (:loop-iteration-values-in-finally :ansi-spec-problem)
(loop for x from 10 downto 0 do (progn) finally (return x))
(deftest loop.1.43
:notes (:loop-iteration-values-in-finally :ansi-spec-problem)
(loop for x from 10 above 0 do (progn) finally (return x))
......@@ -46,6 +46,10 @@ If negative zeros are distinct this is probably not good, since it makes (defcon
"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).")
(defnote :loop-iteration-values-in-finally
"Assume that the values of iteration values in LOOP's FINALLY clause are defined to never
overstep the iteration limit.")
;;; Haible disagrees with :result-type-element-type-by-subtype
#+clisp (rt::disable-note :result-type-element-type-by-subtype)
#+(or openmcl gcl ecl) (rt::disable-note :nil-vectors-are-strings)
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