test/testiconv.c
changeset 1502 d403a39389da
parent 1501 73dc5d39bbf8
child 1516 4d241ea8a1cd
     1.1 --- a/test/testiconv.c	Mon Mar 13 01:08:00 2006 +0000
     1.2 +++ b/test/testiconv.c	Mon Mar 13 01:16:16 2006 +0000
     1.3 @@ -3,7 +3,7 @@
     1.4  
     1.5  #include "SDL.h"
     1.6  
     1.7 -static SDL_bool testutf16(char *data)
     1.8 +static SDL_bool testutf1632(char *data)
     1.9  {
    1.10  	Uint32 *p = (Uint32 *)data;
    1.11  	while(*p) {
    1.12 @@ -63,8 +63,10 @@
    1.13  		size_t len = (widelen(ucs4)+1)*4;
    1.14  		for ( i = 0; i < SDL_arraysize(formats); ++i ) {
    1.15  			if ( (SDL_strncasecmp(formats[i], "UTF16", 5) == 0 ||
    1.16 -			      SDL_strncasecmp(formats[i], "UTF-16", 6) == 0) &&
    1.17 -			      !testutf16(ucs4) ) {
    1.18 +			      SDL_strncasecmp(formats[i], "UTF-16", 6) == 0 ||
    1.19 +			      SDL_strncasecmp(formats[i], "UTF32", 5) == 0 ||
    1.20 +			      SDL_strncasecmp(formats[i], "UTF-32", 6) == 0) &&
    1.21 +			      !testutf1632(ucs4) ) {
    1.22  				continue;
    1.23  			}
    1.24  			test[0] = SDL_iconv_string(formats[i], "UCS-4", ucs4, len);