1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Adjust tests to work with esm_rewrite branch.

(cherry picked from commit aae1aa3708bf7a48e768f6b323372f5a61aa93ca)
This commit is contained in:
scrawl 2015-11-14 00:23:35 +01:00 committed by cc9cii
parent 0d9ffe8119
commit 33c0db1d9a

View File

@ -5,14 +5,13 @@
#include <components/files/configurationmanager.hpp>
#include <components/esm/esmreader.hpp>
#include <components/esm/esmwriter.hpp>
#include <components/files/memorystream.hpp>
#include <components/loadinglistener/loadinglistener.hpp>
#include "apps/openmw/mwworld/esmstore.hpp"
static Loading::Listener dummyListener;
/// Base class for tests of ESMStore that rely on external content files to produce the test data
/// Base class for tests of ESMStore that rely on external content files to produce the test results
struct ContentFileTest : public ::testing::Test
{
protected:
@ -228,10 +227,7 @@ Files::IStreamPtr getEsmFile(T record, bool deleted)
writer.setFormat(0);
writer.save(*stream);
writer.startRecord(T::sRecordId);
writer.writeHNString("NAME", record.mId);
if (deleted)
writer.writeHNT("DELE", (int)1);
record.save(writer);
record.save(writer, deleted);
writer.endRecord(T::sRecordId);
return Files::IStreamPtr(stream);