From 6e0286b9a937490b05edb097770803df7e19f0cb Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 22 Mar 2014 17:43:34 +0100 Subject: [PATCH] fix broken test --- src/json_test.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/json_test.c b/src/json_test.c index c2706f79f..f9dc9cd98 100644 --- a/src/json_test.c +++ b/src/json_test.c @@ -63,10 +63,8 @@ static cJSON *export_a_region(CuTest * tc, const struct terrain_type *terrain, r json = cJSON_Parse(buf); CuAssertPtrNotNull(tc, json); CuAssertIntEquals(tc, cJSON_Object, json->type); - json = json->child; - CuAssertPtrEquals(tc, 0, json->next); + json = cJSON_GetObjectItem(json, "regions"); CuAssertIntEquals(tc, cJSON_Object, json->type); - CuAssertStrEquals(tc, "regions", json->string); json = json->child; CuAssertIntEquals(tc, r->uid, atoi(json->string)); CuAssertPtrNotNull(tc, attr = cJSON_GetObjectItem(json, "x"));