From 9c6e96d743c993f1b92f0cc2f07164d44780536e Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 9 Nov 2008 17:40:40 +0000 Subject: Return errors from tokeniser constructor/destructor svn path=/trunk/hubbub/; revision=5664 --- test/tokeniser.c | 4 ++-- test/tokeniser2.c | 4 ++-- test/tokeniser3.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/tokeniser.c b/test/tokeniser.c index 913b66f..0614e78 100644 --- a/test/tokeniser.c +++ b/test/tokeniser.c @@ -41,8 +41,8 @@ int main(int argc, char **argv) assert(parserutils_inputstream_create("UTF-8", 0, NULL, myrealloc, NULL, &stream) == PARSERUTILS_OK); - tok = hubbub_tokeniser_create(stream, myrealloc, NULL); - assert(tok != NULL); + assert(hubbub_tokeniser_create(stream, myrealloc, NULL, &tok) == + HUBBUB_OK); params.token_handler.handler = token_handler; params.token_handler.pw = NULL; diff --git a/test/tokeniser2.c b/test/tokeniser2.c index d033934..59ea72f 100644 --- a/test/tokeniser2.c +++ b/test/tokeniser2.c @@ -144,8 +144,8 @@ void run_test(context *ctx) assert(parserutils_inputstream_create("UTF-8", 0, NULL, myrealloc, NULL, &stream) == PARSERUTILS_OK); - tok = hubbub_tokeniser_create(stream, myrealloc, NULL); - assert(tok != NULL); + assert(hubbub_tokeniser_create(stream, myrealloc, NULL, &tok) == + HUBBUB_OK); if (ctx->last_start_tag != NULL) { /* Fake up a start tag, in PCDATA state */ diff --git a/test/tokeniser3.c b/test/tokeniser3.c index b7ca15e..95a5cbc 100644 --- a/test/tokeniser3.c +++ b/test/tokeniser3.c @@ -141,8 +141,8 @@ void run_test(context *ctx) assert(parserutils_inputstream_create("UTF-8", 0, NULL, myrealloc, NULL, &stream) == PARSERUTILS_OK); - tok = hubbub_tokeniser_create(stream, myrealloc, NULL); - assert(tok != NULL); + assert(hubbub_tokeniser_create(stream, myrealloc, NULL, &tok) == + HUBBUB_OK); if (ctx->last_start_tag != NULL) { /* Fake up a start tag, in PCDATA state */ -- cgit v1.2.3