2012-06-04 03:41:07 +02:00
|
|
|
#include <platform.h>
|
|
|
|
|
|
|
|
#include <kernel/types.h>
|
2012-05-19 20:26:46 +02:00
|
|
|
#include <kernel/item.h>
|
|
|
|
#include <kernel/region.h>
|
|
|
|
|
2012-06-04 03:41:07 +02:00
|
|
|
#include <util/language.h>
|
|
|
|
|
2012-05-31 04:17:08 +02:00
|
|
|
#include <CuTest.h>
|
2012-06-04 08:36:40 +02:00
|
|
|
#include <tests.h>
|
2012-05-19 20:26:46 +02:00
|
|
|
|
|
|
|
static void test_recreate_world(CuTest * tc)
|
|
|
|
{
|
|
|
|
test_cleanup();
|
2012-05-19 20:49:47 +02:00
|
|
|
CuAssertPtrEquals(tc, 0, find_locale("de"));
|
2012-05-19 20:26:46 +02:00
|
|
|
CuAssertPtrEquals(tc, 0, it_find("money"));
|
|
|
|
CuAssertPtrEquals(tc, 0, it_find("horse"));
|
2012-05-22 06:39:18 +02:00
|
|
|
|
2012-05-19 20:26:46 +02:00
|
|
|
test_create_world();
|
2012-05-19 20:49:47 +02:00
|
|
|
CuAssertPtrEquals(tc, default_locale, find_locale("de"));
|
|
|
|
CuAssertPtrNotNull(tc, default_locale);
|
2012-05-22 06:39:18 +02:00
|
|
|
CuAssertPtrNotNull(tc, findregion(0, 0));
|
2012-05-19 20:26:46 +02:00
|
|
|
CuAssertPtrNotNull(tc, it_find("money"));
|
|
|
|
CuAssertPtrNotNull(tc, it_find("horse"));
|
2012-05-22 06:39:18 +02:00
|
|
|
CuAssertPtrNotNull(tc, rt_find("horse"));
|
|
|
|
CuAssertPtrNotNull(tc, rt_find("hp"));
|
|
|
|
CuAssertPtrNotNull(tc, rt_find("money"));
|
|
|
|
CuAssertPtrNotNull(tc, rt_find("aura"));
|
|
|
|
CuAssertPtrNotNull(tc, rt_find("permaura"));
|
|
|
|
CuAssertPtrNotNull(tc, rt_find("peasant"));
|
|
|
|
CuAssertPtrNotNull(tc, rt_find("unit"));
|
|
|
|
|
2012-05-19 20:26:46 +02:00
|
|
|
test_cleanup();
|
2012-05-19 20:49:47 +02:00
|
|
|
CuAssertPtrEquals(tc, 0, find_locale("de"));
|
2012-05-19 20:26:46 +02:00
|
|
|
CuAssertPtrEquals(tc, 0, it_find("money"));
|
|
|
|
CuAssertPtrEquals(tc, 0, it_find("horse"));
|
2012-05-22 06:39:18 +02:00
|
|
|
CuAssertPtrEquals(tc, 0, rt_find("horse"));
|
|
|
|
CuAssertPtrEquals(tc, 0, rt_find("hp"));
|
|
|
|
CuAssertPtrEquals(tc, 0, rt_find("money"));
|
|
|
|
CuAssertPtrEquals(tc, 0, rt_find("aura"));
|
|
|
|
CuAssertPtrEquals(tc, 0, rt_find("permaura"));
|
|
|
|
CuAssertPtrEquals(tc, 0, rt_find("peasant"));
|
|
|
|
CuAssertPtrEquals(tc, 0, rt_find("unit"));
|
2012-05-19 20:26:46 +02:00
|
|
|
CuAssertPtrEquals(tc, 0, findregion(0, 0));
|
|
|
|
}
|
|
|
|
|
|
|
|
CuSuite *get_tests_suite(void)
|
|
|
|
{
|
|
|
|
CuSuite *suite = CuSuiteNew();
|
|
|
|
SUITE_ADD_TEST(suite, test_recreate_world);
|
|
|
|
return suite;
|
|
|
|
}
|