add a (red) test for JSON prefixes.

This commit is contained in:
Enno Rehling 2015-09-12 12:33:25 +02:00
parent 44d982d210
commit 9f6b374056
2 changed files with 9 additions and 1 deletions

View File

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

View File

@ -1,3 +1,4 @@
#include <platform.h>
#include "prefix.h" #include "prefix.h"
#include <stddef.h> #include <stddef.h>