X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftest_json.c;h=39c5e3cd9f54e09344642475da6ca40228b445ff;hp=b33c35425b0e9647d6a87830cd4b67c7f83702c0;hb=69b1d8e7b437179163fe97b7cbead51a56835f2a;hpb=d0e351c12fff564d876958e860338d43716dc269 diff --git a/test/test_json.c b/test/test_json.c index b33c354..39c5e3c 100644 --- a/test/test_json.c +++ b/test/test_json.c @@ -1,9 +1,9 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2013 Index Data * See the file LICENSE for details. */ /** - * \file + * \file * \brief JSON test */ #if HAVE_CONFIG_H @@ -15,7 +15,7 @@ #include #include -static int expect(json_parser_t p, const char *input, +static int expect(json_parser_t p, const char *input, const char *output) { int ret = 0; @@ -84,7 +84,7 @@ static void tst1(void) YAZ_CHECK(expect(p, "{} extra", 0)); YAZ_CHECK(expect(p, "{\"a\":[1,2,3}", 0)); - + YAZ_CHECK(expect(p, "{\"a\":[1,2,", 0)); YAZ_CHECK(expect(p, "{\"k\":\"wa\"}", "{\"k\":\"wa\"}")); @@ -150,7 +150,7 @@ static void tst2(void) return; YAZ_CHECK_EQ(json_count_children(n), 3); - + n1 = json_get_object(n, "a"); YAZ_CHECK(n1 && n1->type == json_node_number && n1->u.number == 1.0); YAZ_CHECK_EQ(json_count_children(n1), 0);