Adjust tests to work with esm_rewrite branch.

openmw-38
scrawl 9 years ago
parent f91aae2350
commit aae1aa3708

@ -5,14 +5,13 @@
#include <components/files/configurationmanager.hpp> #include <components/files/configurationmanager.hpp>
#include <components/esm/esmreader.hpp> #include <components/esm/esmreader.hpp>
#include <components/esm/esmwriter.hpp> #include <components/esm/esmwriter.hpp>
#include <components/files/memorystream.hpp>
#include <components/loadinglistener/loadinglistener.hpp> #include <components/loadinglistener/loadinglistener.hpp>
#include "apps/openmw/mwworld/esmstore.hpp" #include "apps/openmw/mwworld/esmstore.hpp"
static Loading::Listener dummyListener; 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 struct ContentFileTest : public ::testing::Test
{ {
protected: protected:
@ -228,10 +227,7 @@ Files::IStreamPtr getEsmFile(T record, bool deleted)
writer.setFormat(0); writer.setFormat(0);
writer.save(*stream); writer.save(*stream);
writer.startRecord(T::sRecordId); writer.startRecord(T::sRecordId);
writer.writeHNString("NAME", record.mId); record.save(writer, deleted);
if (deleted)
writer.writeHNT("DELE", (int)1);
record.save(writer);
writer.endRecord(T::sRecordId); writer.endRecord(T::sRecordId);
return Files::IStreamPtr(stream); return Files::IStreamPtr(stream);

Loading…
Cancel
Save