diff --git a/src/json_test.c b/src/json_test.c index f9dc9cd98..7c1027596 100644 --- a/src/json_test.c +++ b/src/json_test.c @@ -63,7 +63,9 @@ 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 = cJSON_GetObjectItem(json, "regions"); + CuAssertPtrEquals(tc, 0, cJSON_GetObjectItem(json, "factions")); + CuAssertPtrEquals(tc, 0, cJSON_GetObjectItem(json, "units")); + CuAssertPtrNotNull(tc, json = cJSON_GetObjectItem(json, "regions")); CuAssertIntEquals(tc, cJSON_Object, json->type); json = json->child; CuAssertIntEquals(tc, r->uid, atoi(json->string));