Re: :type-added-1,2 tests

Sam Steingold <[email protected]>
Newsgroups gmane.lisp.clocc.devel
Message-ID <[email protected]>
> * In message <[email protected]>
> * On the subject of ":type-added-1,2 tests"
> * Sent on 17 Jul 2002 13:13:48 -0400
> * Honorable Raymond Toy <[email protected]> writes:
>
> >From a (very brief) discussion on comp.lang.lisp, the results for
> :type-added-1 and :type-added-2 tests in type.lisp are questionable:
> 
> 
> (check-for-bug :type-added-1
>   (type-of (coerce (list 1 2 3 4) '(simple-array (unsigned-byte 8))))
>   (simple-array (unsigned-byte 8) (4)))
> 
> (check-for-bug :type-added-2
>   (type-of (coerce (list 1 2 3 4) '(simple-array *)))
>   (simple-vector 4))
> 
> Since the desired type is not a subtype of sequence, it is acceptable
> for CMUCL to produce an error here.  (Actually, the discussion says it
> should be mandatory because the type is not a sequence.)
> 
> Perhaps the results should be conditionalized?

I would rather replace the result type with
        (simple-array (unsigned-byte 8) (*))
and
        (simple-array * (*))
respectively.
this way the test would not have to be conditionalized.

-- 
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>
Bill Gates is great, as long as `bill' is a verb.



-------------------------------------------------------
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.