1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 10:22:52 +01:00
openrw/tests/test_loaderdff.cpp
2014-05-25 22:30:50 +01:00

27 lines
532 B
C++

#include <boost/test/unit_test.hpp>
#include "test_globals.hpp"
#include <render/Model.hpp>
BOOST_AUTO_TEST_SUITE(LoaderDFFTests)
BOOST_AUTO_TEST_CASE(test_open_dff)
{
LoaderIMG loader;
BOOST_REQUIRE( loader.load(Global::getGamePath() + "/models/gta3") );
auto d = loader.loadToMemory("landstal.dff");
LoaderDFF dffloader;
Model* m = dffloader.loadFromMemory(d, &Global::get().e->gameData);
BOOST_REQUIRE( m != nullptr );
BOOST_CHECK( m->frames.size() > 0 );
delete d;
delete m;
}
BOOST_AUTO_TEST_SUITE_END()