mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-30 00:11:33 +00:00
Adjust tests to work with esm_rewrite branch.
(cherry picked from commit aae1aa3708
)
This commit is contained in:
parent
0d9ffe8119
commit
33c0db1d9a
1 changed files with 2 additions and 6 deletions
|
@ -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…
Reference in a new issue