diff --git a/res/core/messages.xml b/res/core/messages.xml
index f09530e0f..8c5db1b4d 100644
--- a/res/core/messages.xml
+++ b/res/core/messages.xml
@@ -468,7 +468,7 @@
"Die Ausrüstung von $unit($unit) scheint unsichtbar. ($int36($id))"
"$unit($unit)'s equipment is invisible. ($int36($id))"
-
+
@@ -476,7 +476,7 @@
"Die natürliche Widerstandskraft gegen Verzauberung ist gestärkt. ($int36($id))"
"The magical resistance has been strengthened. ($int36($id))"
-
+
diff --git a/src/donations.test.c b/src/donations.test.c
index b12f1ac62..e61ca2536 100644
--- a/src/donations.test.c
+++ b/src/donations.test.c
@@ -3,6 +3,7 @@
#include
#include
+#include
#include
#include
@@ -12,6 +13,7 @@ static void test_add_donation(CuTest *tc) {
region *r;
test_setup();
+ mt_register(mt_new_va("donation", "from:faction", "to:faction", "amount:int", NULL));
r = test_create_region(0, 0, NULL);
f1 = test_create_faction(NULL);
f2 = test_create_faction(NULL);
diff --git a/src/economy.test.c b/src/economy.test.c
index 51aa06137..ff21f4622 100644
--- a/src/economy.test.c
+++ b/src/economy.test.c
@@ -369,7 +369,8 @@ static void test_tax_cmd(CuTest *tc) {
test_teardown();
}
-static void setup_maintenance(void) {
+static void setup_economy(void) {
+ mt_register(mt_new_va("recruit", "unit:unit", "region:region", "amount:int", "want:int", NULL));
mt_register(mt_new_va("maintenance", "unit:unit", "building:building", NULL));
mt_register(mt_new_va("maintenancefail", "unit:unit", "building:building", NULL));
mt_register(mt_new_va("maintenance_nowork", "building:building", NULL));
@@ -389,7 +390,7 @@ static void test_maintain_buildings(CuTest *tc) {
item_type *itype;
test_setup();
- setup_maintenance();
+ setup_economy();
btype = test_create_buildingtype("Hort");
btype->maxsize = 10;
r = test_create_region(0, 0, NULL);
@@ -449,6 +450,7 @@ static void test_recruit(CuTest *tc) {
faction *f;
test_setup();
+ setup_economy();
f = test_create_faction(NULL);
u = test_create_unit(f, test_create_region(0, 0, NULL));
CuAssertIntEquals(tc, 1, u->number);
diff --git a/src/kernel/messages.test.c b/src/kernel/messages.test.c
index d60f45649..4afe25518 100644
--- a/src/kernel/messages.test.c
+++ b/src/kernel/messages.test.c
@@ -11,6 +11,7 @@ void test_missing_message(CuTest *tc) {
message *msg;
test_setup();
+ message_handle_missing(MESSAGE_MISSING_REPLACE);
msg = msg_message("unknown", "unit", NULL);
CuAssertPtrNotNull(tc, msg);
CuAssertPtrNotNull(tc, msg->type);
diff --git a/src/spells.test.c b/src/spells.test.c
index b3cfb8521..426d82510 100644
--- a/src/spells.test.c
+++ b/src/spells.test.c
@@ -12,8 +12,9 @@
#include
#include
#include
-#include
#include
+#include
+#include
#include
#include
@@ -121,6 +122,8 @@ static void test_view_reality(CuTest *tc) {
castorder co;
test_setup();
+ mt_register(mt_new_va("spell_astral_only", "unit:unit", "region:region", "command:order", NULL));
+ mt_register(mt_new_va("viewreality_effect", "unit:unit", NULL));
r = test_create_region(0, 0, NULL);
ra = test_create_region(real2tp(r->x), real2tp(r->y), NULL);
ra->_plane = get_astralplane();
diff --git a/src/spells/magicresistance.c b/src/spells/magicresistance.c
index 6f2ec49ec..f5cbb55dd 100644
--- a/src/spells/magicresistance.c
+++ b/src/spells/magicresistance.c
@@ -10,14 +10,14 @@ static struct message *cinfo_magicresistance(const void *obj, objtype_t typ, con
if (typ == TYP_UNIT) {
if (self != 0) {
const struct unit *u = (const struct unit *)obj;
- return msg_message(mkname("curseinfo", "magicresistance_unit"), "unit id", u,
+ return msg_message("magicresistance_unit", "unit id", u,
c->no);
}
return NULL;
}
if (typ == TYP_BUILDING) {
const struct building *b = (const struct building *)obj;
- return msg_message(mkname("curseinfo", "magicresistance_building"), "id building", c->no, b);
+ return msg_message("magicresistance_building", "id building", c->no, b);
}
return 0;
}
diff --git a/src/spells/magicresistance.test.c b/src/spells/magicresistance.test.c
index 3af64b1ce..ccce0216c 100644
--- a/src/spells/magicresistance.test.c
+++ b/src/spells/magicresistance.test.c
@@ -29,6 +29,7 @@ static void test_magicresistance_unit(CuTest *tc) {
curse *c;
test_setup();
+ mt_register(mt_new_va("magicresistance_unit", "unit:unit", "id:int", NULL));
r = test_create_plain(0, 0);
f1 = test_create_faction(NULL);
u1 = test_create_unit(f1, r);
@@ -41,7 +42,7 @@ static void test_magicresistance_unit(CuTest *tc) {
CuAssertPtrEquals(tc, (void *)&at_curse, (void *)u2->attribs->type);
msg = c->type->curseinfo(u2, TYP_UNIT, c, 1);
CuAssertPtrNotNull(tc, msg);
- CuAssertStrEquals(tc, "curseinfo::magicresistance_unit", test_get_messagetype(msg));
+ CuAssertStrEquals(tc, "magicresistance_unit", test_get_messagetype(msg));
msg_release(msg);
test_teardown();
@@ -56,6 +57,7 @@ static void test_magicresistance_building(CuTest *tc) {
curse *c;
test_setup();
+ mt_register(mt_new_va("magicresistance_building", "building:building", "id:int", NULL));
r = test_create_plain(0, 0);
f1 = test_create_faction(NULL);
u1 = test_create_unit(f1, r);
@@ -67,7 +69,7 @@ static void test_magicresistance_building(CuTest *tc) {
CuAssertPtrEquals(tc, (void *)&at_curse, (void *)b1->attribs->type);
msg = c->type->curseinfo(b1, TYP_BUILDING, c, 1);
CuAssertPtrNotNull(tc, msg);
- CuAssertStrEquals(tc, "curseinfo::magicresistance_building", test_get_messagetype(msg));
+ CuAssertStrEquals(tc, "magicresistance_building", test_get_messagetype(msg));
msg_release(msg);
test_teardown();
}
diff --git a/src/test_eressea.c b/src/test_eressea.c
index a192ad4aa..fe3458d1e 100644
--- a/src/test_eressea.c
+++ b/src/test_eressea.c
@@ -2,7 +2,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -185,6 +184,5 @@ int main(int argc, char ** argv) {
++argv;
--argc;
}
- message_handle_missing(MESSAGE_MISSING_REPLACE);
return RunAllTests(argc, argv);
}
diff --git a/src/tests.c b/src/tests.c
index 79d785cad..b6bed9bc4 100644
--- a/src/tests.c
+++ b/src/tests.c
@@ -9,6 +9,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -22,7 +23,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -245,6 +245,7 @@ static void test_reset(void) {
void test_setup_test(CuTest *tc, const char *file, int line) {
test_log_stderr(LOG_CPERROR);
test_reset();
+ message_handle_missing(MESSAGE_MISSING_ERROR);
if (tc) {
log_debug("start test: %s", tc->name);
}