From fcc846da956fc5ce6e4832b8cf957b19c17ac662 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 26 Feb 2016 20:07:51 +0100 Subject: [PATCH] all of the easy external file tests are eliminated --- src/kernel/group.test.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/kernel/group.test.c b/src/kernel/group.test.c index 4dc9799a5..7fa7fa234 100644 --- a/src/kernel/group.test.c +++ b/src/kernel/group.test.c @@ -24,6 +24,8 @@ #include static void test_group_readwrite_dead_faction(CuTest *tc) { + gamedata data; + storage store; faction *f, *f2; unit * u; group *g; @@ -48,10 +50,15 @@ static void test_group_readwrite_dead_faction(CuTest *tc) { destroyfaction(&factions); CuAssertTrue(tc, !f->_alive); CuAssertPtrEquals(tc, f2, factions); - writegame("test.dat"); + mstream_init(&data.strm); + gamedata_init(&data, &store, RELEASE_VERSION); + write_game(&data); free_gamedata(); f = f2 = NULL; - readgame("test.dat", false); + data.strm.api->rewind(data.strm.handle); + read_game(&data); + mstream_done(&data.strm); + gamedata_done(&data); CuAssertPtrEquals(tc, 0, findfaction(fno)); f2 = factions; CuAssertPtrNotNull(tc, f2);