[ansi-test-devel] STRING-IS-NOT-VECTOR-OF-CHARACTER.1
Raymond Toy
toy.raymond at gmail.com
Wed Apr 14 20:24:06 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)
>
> (deftest vector-of-character-is-string.2
> ===================================================================
> (and similar string-is-not-vector-of-character.3 &
> string-is-not-vector-of-character.5)
> but I am afraid that there is nothing in the standard which prevents
> implementors
> from having subtypes of character other than base-char and
> extended-char and specialized strings for those, so this change will
> not finish the story.
>
>
Couldn't just test if character is a subtypep of base-char? (I.e.,
types are equal)
A similar problem exists for
simple-string-is-not-simple-1d-array-of-character. And base-string.6,
simple-string.8, simple-string.9.
As an enhancement, it would be nice if char-upcase.2 and friends
returned a list of the characters that failed. (I'll see if I can
produce a patch for that.)
Ray
More information about the ansi-test-devel
mailing list