forked from github/server
25 lines
654 B
C
25 lines
654 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(rc, NAME_SINGULAR));
|
||
|
CuAssertStrEquals(tc, "race::human_p", rc_name(rc, NAME_PLURAL));
|
||
|
CuAssertStrEquals(tc, "race::human_d", rc_name(rc, NAME_DEFINITIVE));
|
||
|
CuAssertStrEquals(tc, "race::human_x", rc_name(rc, NAME_CATEGORY));
|
||
|
}
|
||
|
|
||
|
CuSuite *get_race_suite(void)
|
||
|
{
|
||
|
CuSuite *suite = CuSuiteNew();
|
||
|
SUITE_ADD_TEST(suite, test_rc_name);
|
||
|
return suite;
|
||
|
}
|
||
|
|