forked from github/server
test that EXPORT_REGIONS doesn't export anything else
This commit is contained in:
parent
6e0286b9a9
commit
dde8d35b3d
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue