forked from github/server
add test suite for seen_region logic (empty)
This commit is contained in:
parent
9312b44f8e
commit
8562a6d072
|
@ -183,6 +183,7 @@ set(TESTS_SRC
|
||||||
vortex.test.c
|
vortex.test.c
|
||||||
tests.test.c
|
tests.test.c
|
||||||
reports.test.c
|
reports.test.c
|
||||||
|
seen.test.c
|
||||||
travelthru.test.c
|
travelthru.test.c
|
||||||
callback.test.c
|
callback.test.c
|
||||||
direction.test.c
|
direction.test.c
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
#include <platform.h>
|
||||||
|
#include <config.h>
|
||||||
|
#include "seen.h"
|
||||||
|
|
||||||
|
#include <kernel/region.h>
|
||||||
|
|
||||||
|
#include <CuTest.h>
|
||||||
|
#include <tests.h>
|
||||||
|
|
||||||
|
static void test_seen_region(CuTest *tc) {
|
||||||
|
region *r;
|
||||||
|
seen_region **seen;
|
||||||
|
|
||||||
|
test_cleanup();
|
||||||
|
r = test_create_region(0, 0, 0);
|
||||||
|
seen = seen_init();
|
||||||
|
seen_done(seen);
|
||||||
|
test_cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
CuSuite *get_seen_suite(void)
|
||||||
|
{
|
||||||
|
CuSuite *suite = CuSuiteNew();
|
||||||
|
SUITE_ADD_TEST(suite, test_seen_region);
|
||||||
|
return suite;
|
||||||
|
}
|
|
@ -36,6 +36,7 @@ int RunAllTests(void)
|
||||||
/* self-test */
|
/* self-test */
|
||||||
RUN_TESTS(suite, tests);
|
RUN_TESTS(suite, tests);
|
||||||
RUN_TESTS(suite, callback);
|
RUN_TESTS(suite, callback);
|
||||||
|
RUN_TESTS(suite, seen);
|
||||||
RUN_TESTS(suite, json);
|
RUN_TESTS(suite, json);
|
||||||
RUN_TESTS(suite, jsonconf);
|
RUN_TESTS(suite, jsonconf);
|
||||||
RUN_TESTS(suite, direction);
|
RUN_TESTS(suite, direction);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include "tests.h"
|
#include "tests.h"
|
||||||
#include "keyword.h"
|
#include "keyword.h"
|
||||||
|
#include "seen.h"
|
||||||
|
|
||||||
#include <kernel/config.h>
|
#include <kernel/config.h>
|
||||||
#include <kernel/region.h>
|
#include <kernel/region.h>
|
||||||
|
@ -82,6 +83,7 @@ void test_cleanup(void)
|
||||||
free_races();
|
free_races();
|
||||||
free_spellbooks();
|
free_spellbooks();
|
||||||
free_gamedata();
|
free_gamedata();
|
||||||
|
free_seen();
|
||||||
mt_clear();
|
mt_clear();
|
||||||
if (!mt_find("missing_message")) {
|
if (!mt_find("missing_message")) {
|
||||||
mt_register(mt_new_va("missing_message", "name:string", 0));
|
mt_register(mt_new_va("missing_message", "name:string", 0));
|
||||||
|
|
Loading…
Reference in New Issue