forked from github/server
add a (red) test for JSON prefixes.
This commit is contained in:
parent
44d982d210
commit
9f6b374056
|
@ -12,7 +12,11 @@
|
||||||
#include "spell.h"
|
#include "spell.h"
|
||||||
#include "order.h"
|
#include "order.h"
|
||||||
#include "terrain.h"
|
#include "terrain.h"
|
||||||
|
|
||||||
|
#include "prefix.h"
|
||||||
|
|
||||||
#include "util/language.h"
|
#include "util/language.h"
|
||||||
|
|
||||||
#include <CuTest.h>
|
#include <CuTest.h>
|
||||||
#include <cJSON.h>
|
#include <cJSON.h>
|
||||||
#include <tests.h>
|
#include <tests.h>
|
||||||
|
@ -88,7 +92,10 @@ static void test_prefixes(CuTest * tc)
|
||||||
|
|
||||||
test_cleanup();
|
test_cleanup();
|
||||||
json_config(json);
|
json_config(json);
|
||||||
// CuAssertStrEquals("dark", get_prefix("snow"));
|
CuAssertPtrNotNull(tc, race_prefixes);
|
||||||
|
CuAssertStrEquals(tc, "snow", race_prefixes[0]);
|
||||||
|
CuAssertStrEquals(tc, "dark", race_prefixes[2]);
|
||||||
|
CuAssertPtrEquals(tc, 0, race_prefixes[3]);
|
||||||
test_cleanup();
|
test_cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <platform.h>
|
||||||
#include "prefix.h"
|
#include "prefix.h"
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
Loading…
Reference in New Issue