diff options
Diffstat (limited to 'test/cscodec-utf16.c')
-rw-r--r-- | test/cscodec-utf16.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/cscodec-utf16.c b/test/cscodec-utf16.c index 25ebb8c..d61fd64 100644 --- a/test/cscodec-utf16.c +++ b/test/cscodec-utf16.c @@ -43,6 +43,7 @@ static void *myrealloc(void *ptr, size_t len, void *pw) int main(int argc, char **argv) { + parserutils_charset_codec *codec; line_ctx ctx; if (argc != 3) { @@ -54,10 +55,10 @@ int main(int argc, char **argv) PARSERUTILS_OK); assert(parserutils_charset_codec_create("NATS-SEFI-ADD", - myrealloc, NULL) == NULL); + myrealloc, NULL, &codec) == PARSERUTILS_BADENCODING); - ctx.codec = parserutils_charset_codec_create("UTF-16", myrealloc, NULL); - assert(ctx.codec != NULL); + assert(parserutils_charset_codec_create("UTF-16", myrealloc, NULL, + &ctx.codec) == PARSERUTILS_OK); ctx.buflen = parse_filesize(argv[2]); if (ctx.buflen == 0) |