forked from github/server
0fead39b41
deprecate old rc_name function (renamed to rc_name_s) because it used a static return string.
24 lines
662 B
C
24 lines
662 B
C
#include <platform.h>
|
|
#include <kernel/config.h>
|
|
#include "race.h"
|
|
#include <CuTest.h>
|
|
#include <tests.h>
|
|
|
|
#include <stdlib.h>
|
|
#include <assert.h>
|
|
|
|
static void test_rc_name(CuTest *tc) {
|
|
struct race *rc = test_create_race("human");
|
|
CuAssertStrEquals(tc, "race::human", rc_name_s(rc, NAME_SINGULAR));
|
|
CuAssertStrEquals(tc, "race::human_p", rc_name_s(rc, NAME_PLURAL));
|
|
CuAssertStrEquals(tc, "race::human_d", rc_name_s(rc, NAME_DEFINITIVE));
|
|
CuAssertStrEquals(tc, "race::human_x", rc_name_s(rc, NAME_CATEGORY));
|
|
}
|
|
|
|
CuSuite *get_race_suite(void)
|
|
{
|
|
CuSuite *suite = CuSuiteNew();
|
|
SUITE_ADD_TEST(suite, test_rc_name);
|
|
return suite;
|
|
}
|
|
|