From a47da05f515f425f301eba5eed7e8e756cda2494 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 11 Nov 2016 15:41:34 +0100 Subject: [PATCH] test unit names get fixed during read. --- src/kernel/save.test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kernel/save.test.c b/src/kernel/save.test.c index 00b5ff96c..2b1f0464d 100644 --- a/src/kernel/save.test.c +++ b/src/kernel/save.test.c @@ -55,7 +55,8 @@ static void test_readwrite_unit(CuTest * tc) f = test_create_faction(0); fno = f->no; u = test_create_unit(f, r); - + unit_setname(u, " Hodor "); + CuAssertStrEquals(tc, " Hodor ", u->_name); mstream_init(&data.strm); gamedata_init(&data, &store, RELEASE_VERSION); write_unit(&data, u); @@ -69,6 +70,7 @@ static void test_readwrite_unit(CuTest * tc) u = read_unit(&data); CuAssertPtrNotNull(tc, u); CuAssertPtrEquals(tc, f, u->faction); + CuAssertStrEquals(tc, "Hodor", u->_name); CuAssertPtrEquals(tc, 0, u->region); mstream_done(&data.strm);