diff --git a/src/economy.test.c b/src/economy.test.c index f734c0090..91d462770 100644 --- a/src/economy.test.c +++ b/src/economy.test.c @@ -93,7 +93,7 @@ static void test_steal_okay(CuTest * tc) { rc->flags = 0; setup_steal(&env, ter, rc); CuAssertPtrEquals(tc, NULL, msg = steal_message(env.u, 0)); - msg_release(msg); + assert(!msg); test_teardown(); } diff --git a/src/give.test.c b/src/give.test.c index fb5095f06..9c07c8cd0 100644 --- a/src/give.test.c +++ b/src/give.test.c @@ -147,7 +147,7 @@ static void test_give_men(CuTest * tc) { env.f2 = env.f1 = test_create_faction(NULL); setup_give(&env); CuAssertPtrEquals(tc, NULL, msg = give_men(1, env.src, env.dst, NULL)); - msg_release(msg); + assert(!msg); CuAssertIntEquals(tc, 2, env.dst->number); CuAssertIntEquals(tc, 0, env.src->number); test_teardown(); @@ -233,7 +233,7 @@ static void test_give_men_too_many(CuTest * tc) { env.f2 = env.f1 = test_create_faction(NULL); setup_give(&env); CuAssertPtrEquals(tc, NULL, msg = give_men(2, env.src, env.dst, NULL)); - msg_release(msg); + assert(!msg); CuAssertIntEquals(tc, 2, env.dst->number); CuAssertIntEquals(tc, 0, env.src->number); test_teardown(); diff --git a/src/kernel/messages.test.c b/src/kernel/messages.test.c index f068f66e7..3c9c684c6 100644 --- a/src/kernel/messages.test.c +++ b/src/kernel/messages.test.c @@ -7,6 +7,8 @@ #include #include +#include + void test_missing_message(CuTest *tc) { message *msg; @@ -87,9 +89,9 @@ static void test_noerror(CuTest *tc) { CuAssertIntEquals(tc, K_MOVE | CMD_QUIET | CMD_PERSIST, u->thisorder->command); CuAssertTrue(tc, !is_persistent(u->thisorder)); CuAssertPtrEquals(tc, NULL, msg = msg_error(u, u->thisorder, 100)); - msg_release(msg); + assert(!msg); CuAssertPtrEquals(tc, NULL, msg = msg_feedback(u, u->thisorder, "error_unit_not_found", NULL)); - msg_release(msg); + assert(!msg); test_teardown(); }