diff --git a/src/kernel/config.c b/src/kernel/config.c index 1db17a495..3410f7bff 100644 --- a/src/kernel/config.c +++ b/src/kernel/config.c @@ -1611,6 +1611,8 @@ void set_default_order(int kwd) { default_keyword = (keyword_t)kwd; } +// TODO: outside of tests, default_keyword is never used, why is this here? +// see also test_long_order_hungry order *default_order(const struct locale *lang) { static int usedefault = 1; diff --git a/src/kernel/curse.test.c b/src/kernel/curse.test.c index 0df115397..bf9f1c85c 100644 --- a/src/kernel/curse.test.c +++ b/src/kernel/curse.test.c @@ -33,9 +33,10 @@ static void test_curse(CuTest * tc) cid = c->no; result = findcurse(cid); CuAssertPtrEquals(tc, c, result); - destroy_curse(c); + a_remove(&attrs, attrs); result = findcurse(cid); CuAssertPtrEquals(tc, NULL, result); + test_cleanup(); } typedef struct { diff --git a/src/laws.test.c b/src/laws.test.c index 5a91d54d4..3c0be9b6a 100644 --- a/src/laws.test.c +++ b/src/laws.test.c @@ -999,7 +999,8 @@ static void test_long_order_buy_cast(CuTest *tc) { } static void test_long_order_hungry(CuTest *tc) { - // TODO: write more tests + // FIXME: set_default_order is a test-only function, this is a bad test. + // see also default_order unit *u; test_cleanup(); set_param(&global.parameters, "hunger.long", "1");