Re: Some comments on the ansi test suite

Sam Steingold <[email protected]>
Newsgroups gmane.lisp.clocc.devel
Message-ID <[email protected]>
> * In message <[email protected]>
> * On the subject of "Re: Some comments on the ansi test suite"
> * Sent on 15 Jul 2002 17:08:34 -0400
> * Honorable Raymond Toy <[email protected]> writes:
>
> >>>>> "Sam" == Sam Steingold <[email protected]> writes:
>     >> * Honorable Raymond Toy <[email protected]> writes:
>     >> 
>     >> IOFKTS-LEGACY-881 says all 10 characters are used up.  I think this is
>     >> wrong because vector-push-extend is supposed to be used.
> 
>     Sam> but if the supplied string is not actually expandable, an
>     Sam> error should be signaled, as is clearly indicated by the
>     Sam> writeup in issue 365.
> 
>     Sam> the problem here is that implementations are not required to
>     Sam> create non-expandable strings, so there is certain latitude
>     Sam> here.
> 
>     Sam> I suggest that we condition the results on the
>     Sam> implementations, assuming that the "default" implementation
>     Sam> would create a non-expandable string and thus signal an
>     Sam> error.
> 
> I think the test should check if the array a is adjustable or not and
> have the result depend on that as well as the actual string, and not
> on the implementation.  (Assuming you meant read-time conditionals.)

yes, this is what I meant

> Perhaps something like
> 
> (check-for-bug :iofkts-legacy-881
>   (let ((a (make-array 10
>                        :element-type 'character
>                        :fill-pointer 0)))
>     (with-output-to-string (s a) (princ 123 s))
>     (with-output-to-string (s a) (princ 4567 s))
>     (with-output-to-string (s a)
>       (princ 890 s))
>     (with-output-to-string (s a)
>       (princ (quote a) s))
>     (if (adjustable-array-p a)
>         (equalp a "0123456789A")
>         (equalp a "0123456789")))
>    T)

this is incorrect: when A is not adjustable, an error is signaled.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.2 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
The program isn't debugged until the last user is dead.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.