1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-07 03:12:36 +01:00
openrw/tests/test_GameData.cpp
2016-12-02 00:56:38 +00:00

31 lines
780 B
C++

#include <boost/test/unit_test.hpp>
#include <engine/GameData.hpp>
#include <test_globals.hpp>
BOOST_AUTO_TEST_SUITE(GameDataTests)
#if RW_TEST_WITH_DATA
BOOST_AUTO_TEST_CASE(test_object_data) {
GameData gd(&Global::get().log, Global::getGamePath());
GameWorld gw(&Global::get().log, &gd);
gd.load();
{
auto def = gd.findModelInfo<SimpleModelInfo>(1100);
BOOST_REQUIRE(def);
BOOST_ASSERT(def->type() == ModelDataType::SimpleInfo);
BOOST_CHECK_EQUAL(def->name, "rd_Corner1");
BOOST_CHECK_EQUAL(def->textureslot, "generic");
BOOST_CHECK_EQUAL(def->getNumAtomics(), 1);
BOOST_CHECK_EQUAL(def->getLodDistance(0), 220);
BOOST_CHECK_EQUAL(def->flags, 0);
}
}
#endif
BOOST_AUTO_TEST_SUITE_END()