test that EXPORT_REGIONS doesn't export anything else

This commit is contained in:
Enno Rehling 2014-03-22 17:46:08 +01:00
parent 6e0286b9a9
commit dde8d35b3d
1 changed files with 3 additions and 1 deletions

View File

@ -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));