diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d704fd060..8776c1e5d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -184,6 +184,7 @@ target_link_libraries(eressea set(TESTS_SRC monsters.test.c + names.test.c donations.test.c wormhole.test.c alchemy.test.c diff --git a/src/names.test.c b/src/names.test.c new file mode 100644 index 000000000..234346172 --- /dev/null +++ b/src/names.test.c @@ -0,0 +1,30 @@ +#include + +#include "names.h" + +#include + +#include +#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; +} diff --git a/src/test_eressea.c b/src/test_eressea.c index a28ef9443..8236465cf 100644 --- a/src/test_eressea.c +++ b/src/test_eressea.c @@ -111,6 +111,7 @@ int RunAllTests(int argc, char *argv[]) ADD_SUITE(messages); /* gamecode */ ADD_SUITE(prefix); + ADD_SUITE(names); ADD_SUITE(battle); ADD_SUITE(volcano); ADD_SUITE(donations);