summaryrefslogtreecommitdiff
path: root/test/testiconv.c
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2006-03-14 07:45:15 +0000
committerSam Lantinga <slouken@libsdl.org>2006-03-14 07:45:15 +0000
commit3ad866a41f480ed5dab9deea4809cdb76ce09ee9 (patch)
treef16fa40e36724285e7356e322f86abde2427c426 /test/testiconv.c
parenta809f2328952245d050ffd414eaa07a4b94e0ea6 (diff)
The check for UTF-* isn't needed anymore since UTF-8 has the same code range.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401532
Diffstat (limited to 'test/testiconv.c')
-rw-r--r--test/testiconv.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/test/testiconv.c b/test/testiconv.c
index 034c25b4..012de454 100644
--- a/test/testiconv.c
+++ b/test/testiconv.c
@@ -3,18 +3,6 @@
#include "SDL.h"
-static SDL_bool testutf1632(char *data)
-{
- Uint32 *p = (Uint32 *)data;
- while(*p) {
- if ( *p > 0x10FFFF ) {
- return SDL_FALSE;
- }
- ++p;
- }
- return SDL_TRUE;
-}
-
static size_t widelen(char *data)
{
size_t len = 0;
@@ -63,13 +51,6 @@ int main(int argc, char *argv[])
ucs4 = SDL_iconv_string("UCS-4", "UTF-8", buffer, SDL_strlen(buffer)+1);
len = (widelen(ucs4)+1)*4;
for ( i = 0; i < SDL_arraysize(formats); ++i ) {
- if ( (SDL_strncasecmp(formats[i], "UTF16", 5) == 0 ||
- SDL_strncasecmp(formats[i], "UTF-16", 6) == 0 ||
- SDL_strncasecmp(formats[i], "UTF32", 5) == 0 ||
- SDL_strncasecmp(formats[i], "UTF-32", 6) == 0) &&
- !testutf1632(ucs4) ) {
- continue;
- }
test[0] = SDL_iconv_string(formats[i], "UCS-4", ucs4, len);
test[1] = SDL_iconv_string("UCS-4", formats[i], test[0], len);
if ( SDL_memcmp(test[1], ucs4, len) != 0 ) {