mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 09:15:38 +00:00
Don't ignore material files in NifLoader tests
This commit is contained in:
parent
4e3d45db1b
commit
6f9206428d
1 changed files with 5 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
|||
#include <components/nif/node.hpp>
|
||||
#include <components/nif/property.hpp>
|
||||
#include <components/nifosg/nifloader.hpp>
|
||||
#include <components/resource/bgsmfilemanager.hpp>
|
||||
#include <components/resource/imagemanager.hpp>
|
||||
#include <components/sceneutil/serialize.hpp>
|
||||
#include <components/vfs/manager.hpp>
|
||||
|
@ -29,6 +30,7 @@ namespace
|
|||
{
|
||||
VFS::Manager mVfs;
|
||||
Resource::ImageManager mImageManager{ &mVfs, 0 };
|
||||
Resource::BgsmFileManager mMaterialManager{ &mVfs, 0 };
|
||||
const osgDB::ReaderWriter* mReaderWriter = osgDB::Registry::instance()->getReaderWriterForExtension("osgt");
|
||||
osg::ref_ptr<osgDB::Options> mOptions = new osgDB::Options;
|
||||
|
||||
|
@ -70,7 +72,7 @@ namespace
|
|||
init(node);
|
||||
Nif::NIFFile file("test.nif");
|
||||
file.mRoots.push_back(&node);
|
||||
auto result = Loader::load(file, &mImageManager, nullptr);
|
||||
auto result = Loader::load(file, &mImageManager, &mMaterialManager);
|
||||
EXPECT_EQ(serialize(*result), R"(
|
||||
osg::Group {
|
||||
UniqueID 1
|
||||
|
@ -259,7 +261,7 @@ osg::Group {
|
|||
node.mProperties.push_back(Nif::RecordPtrT<Nif::NiProperty>(&property));
|
||||
Nif::NIFFile file("test.nif");
|
||||
file.mRoots.push_back(&node);
|
||||
auto result = Loader::load(file, &mImageManager, nullptr);
|
||||
auto result = Loader::load(file, &mImageManager, &mMaterialManager);
|
||||
EXPECT_EQ(serialize(*result), formatOsgNodeForBSShaderProperty(GetParam().mExpectedShaderPrefix));
|
||||
}
|
||||
|
||||
|
@ -289,7 +291,7 @@ osg::Group {
|
|||
node.mProperties.push_back(Nif::RecordPtrT<Nif::NiProperty>(&property));
|
||||
Nif::NIFFile file("test.nif");
|
||||
file.mRoots.push_back(&node);
|
||||
auto result = Loader::load(file, &mImageManager, nullptr);
|
||||
auto result = Loader::load(file, &mImageManager, &mMaterialManager);
|
||||
EXPECT_EQ(serialize(*result), formatOsgNodeForBSLightingShaderProperty(GetParam().mExpectedShaderPrefix));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue