forked from github/server
add tests for monster naming functions (existence only).
This commit is contained in:
parent
534708d83e
commit
020ab942ec
|
@ -184,6 +184,7 @@ target_link_libraries(eressea
|
||||||
|
|
||||||
set(TESTS_SRC
|
set(TESTS_SRC
|
||||||
monsters.test.c
|
monsters.test.c
|
||||||
|
names.test.c
|
||||||
donations.test.c
|
donations.test.c
|
||||||
wormhole.test.c
|
wormhole.test.c
|
||||||
alchemy.test.c
|
alchemy.test.c
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
#include <platform.h>
|
||||||
|
|
||||||
|
#include "names.h"
|
||||||
|
|
||||||
|
#include <util/functions.h>
|
||||||
|
|
||||||
|
#include <CuTest.h>
|
||||||
|
#include "tests.h"
|
||||||
|
|
||||||
|
static void test_names(CuTest * tc)
|
||||||
|
{
|
||||||
|
test_cleanup();
|
||||||
|
register_names();
|
||||||
|
CuAssertPtrNotNull(tc, get_function("nameundead"));
|
||||||
|
CuAssertPtrNotNull(tc, get_function("nameskeleton"));
|
||||||
|
CuAssertPtrNotNull(tc, get_function("namezombie"));
|
||||||
|
CuAssertPtrNotNull(tc, get_function("nameghoul"));
|
||||||
|
CuAssertPtrNotNull(tc, get_function("namedragon"));
|
||||||
|
CuAssertPtrNotNull(tc, get_function("namedracoid"));
|
||||||
|
CuAssertPtrNotNull(tc, get_function("namegeneric"));
|
||||||
|
CuAssertPtrNotNull(tc, get_function("describe_braineater"));
|
||||||
|
test_cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
CuSuite *get_names_suite(void)
|
||||||
|
{
|
||||||
|
CuSuite *suite = CuSuiteNew();
|
||||||
|
SUITE_ADD_TEST(suite, test_names);
|
||||||
|
return suite;
|
||||||
|
}
|
|
@ -111,6 +111,7 @@ int RunAllTests(int argc, char *argv[])
|
||||||
ADD_SUITE(messages);
|
ADD_SUITE(messages);
|
||||||
/* gamecode */
|
/* gamecode */
|
||||||
ADD_SUITE(prefix);
|
ADD_SUITE(prefix);
|
||||||
|
ADD_SUITE(names);
|
||||||
ADD_SUITE(battle);
|
ADD_SUITE(battle);
|
||||||
ADD_SUITE(volcano);
|
ADD_SUITE(volcano);
|
||||||
ADD_SUITE(donations);
|
ADD_SUITE(donations);
|
||||||
|
|
Loading…
Reference in New Issue