From 905ae5c4c703400fc2f0bfd9bf4e75d490de7ad6 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 18 Jun 2008 09:08:30 +0000 Subject: Print out expected string, too, so we can see where json-c is failing to decode surrogates correctly. svn path=/trunk/hubbub/; revision=4380 --- test/tokeniser2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/tokeniser2.c b/test/tokeniser2.c index e56df33..e1f42f8 100644 --- a/test/tokeniser2.c +++ b/test/tokeniser2.c @@ -430,7 +430,9 @@ void token_handler(const hubbub_token *token, void *pw) size_t len = min(token->data.character.len, strlen(expstr + ctx->char_off)); - printf("'%.*s'\n", (int) token->data.character.len, gotstr); + printf("expected: '%s'\n", expstr + ctx->char_off); + printf(" got: '%.*s'\n", + (int) token->data.character.len, gotstr); assert(strncmp(gotstr, expstr + ctx->char_off, len) == 0); -- cgit v1.2.3