From dd7b0e4db3d2f48ad2dc12245813535a438baa0b Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 2 Dec 2018 05:10:39 +0100 Subject: [PATCH] re-enable disabled test. --- src/bind_unit.c | 5 ----- src/kernel/messages.test.c | 7 ++++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bind_unit.c b/src/bind_unit.c index 9a5f7e7c6..5303c4562 100644 --- a/src/bind_unit.c +++ b/src/bind_unit.c @@ -432,11 +432,6 @@ static int tolua_unit_effskill(lua_State * L) return 1; } -typedef struct fctr_data { - unit *target; - int fhandle; -} fctr_data; - typedef struct event { struct event_arg *args; char *msg; diff --git a/src/kernel/messages.test.c b/src/kernel/messages.test.c index c186973fa..707eb8e7e 100644 --- a/src/kernel/messages.test.c +++ b/src/kernel/messages.test.c @@ -2,6 +2,7 @@ #include "messages.h" #include "unit.h" +#include "faction.h" #include "order.h" #include @@ -25,10 +26,13 @@ void test_missing_message(CuTest *tc) { void test_missing_feedback(CuTest *tc) { message *msg; + unit *u; test_setup(); + u = test_create_unit(test_create_faction(NULL), test_create_region(0, 0, NULL)); + u->thisorder = create_order(K_ENTERTAIN, u->faction->locale, NULL); message_handle_missing(MESSAGE_MISSING_REPLACE); - msg = msg_error(NULL, NULL, 77); + msg = msg_error(u, NULL, 77); CuAssertPtrNotNull(tc, msg); CuAssertPtrNotNull(tc, msg->type); CuAssertStrEquals(tc, msg->type->name, "missing_feedback"); @@ -113,6 +117,7 @@ static void test_noerror(CuTest *tc) { CuSuite *get_messages_suite(void) { CuSuite *suite = CuSuiteNew(); SUITE_ADD_TEST(suite, test_missing_message); + SUITE_ADD_TEST(suite, test_missing_feedback); SUITE_ADD_TEST(suite, test_merge_split); SUITE_ADD_TEST(suite, test_message); SUITE_ADD_TEST(suite, test_noerror);