[ansi-test-devel] STRING-IS-NOT-VECTOR-OF-CHARACTER.1

Raymond Toy toy.raymond at gmail.com
Thu Apr 15 13:10:01 UTC 2010


On 4/14/10 1:45 PM, Sam Steingold wrote:
> On 4/14/10, Raymond Toy <toy.raymond at gmail.com> wrote:
>   
>> CMUCL currently fails that test (and related) tests because base-char
>>  and character are the same.  (I think that's what this test assumes.)
>>     
> we could, of course, do something like this:
>
> Index: subtypep-array.lsp
> ===================================================================
> --- subtypep-array.lsp	(revision 2151)
> +++ subtypep-array.lsp	(working copy)
> @@ -140,7 +140,9 @@
>
>  (deftest string-is-not-vector-of-character.1
>    :notes (:nil-vectors-are-strings)
> -  (subtypep* 'string '(vector character))
> +  (or (subtypep* 'string '(vector character))
> +      (subtypep* 'string '(vector base-char))
> +      (subtypep* 'string '(vector extended-char)))
>    nil t)
>   
I'm confused.  How is this supposed to fix the issue?  With cmucl,
character and base-char are the same and extended-char is empty.  Thus
the first subtypep* will return T.

Maybe this would work better:

(if (subtypep 'character 'base-char) ; test to see if character and
base-char are the same types
    (values nil t)  ;  Just to satisfy the expected results
    (subtypep* 'string '(vector character)))

Ray





More information about the ansi-test-devel mailing list