comparison test/testiconv.c @ 2143:e906da4414a3

Fix for bug #447 merged from SDL 1.2
author Sam Lantinga <slouken@libsdl.org>
date Wed, 04 Jul 2007 08:01:04 +0000
parents ca80c942e69c
children
comparison
equal deleted inserted replaced
2142:ca80c942e69c 2143:e906da4414a3
59 test[1] = SDL_iconv_string("UCS-4", formats[i], test[0], len); 59 test[1] = SDL_iconv_string("UCS-4", formats[i], test[0], len);
60 if (!test[1] || SDL_memcmp(test[1], ucs4, len) != 0) { 60 if (!test[1] || SDL_memcmp(test[1], ucs4, len) != 0) {
61 fprintf(stderr, "FAIL: %s\n", formats[i]); 61 fprintf(stderr, "FAIL: %s\n", formats[i]);
62 ++errors; 62 ++errors;
63 } 63 }
64 if(test[0]) { 64 if (test[0]) {
65 SDL_free(test[0]); 65 SDL_free(test[0]);
66 } 66 }
67 if(test[1]) { 67 if (test[1]) {
68 SDL_free(test[1]); 68 SDL_free(test[1]);
69 } 69 }
70 } 70 }
71 test[0] = SDL_iconv_string("UTF-8", "UCS-4", ucs4, len); 71 test[0] = SDL_iconv_string("UTF-8", "UCS-4", ucs4, len);
72 SDL_free(ucs4); 72 SDL_free(ucs4);