2015-04-24 19:09:21 +02:00
|
|
|
#include <boost/test/unit_test.hpp>
|
|
|
|
#include <engine/GameData.hpp>
|
|
|
|
#include <test_globals.hpp>
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_SUITE(GameDataTests)
|
|
|
|
|
2016-06-16 22:11:55 +02:00
|
|
|
#if RW_TEST_WITH_DATA
|
2015-04-24 19:09:21 +02:00
|
|
|
BOOST_AUTO_TEST_CASE(test_object_data)
|
|
|
|
{
|
2015-04-27 04:55:18 +02:00
|
|
|
GameData gd(&Global::get().log, &Global::get().work, Global::getGamePath());
|
|
|
|
GameWorld gw(&Global::get().log, &Global::get().work, &gd);
|
2015-04-24 19:09:21 +02:00
|
|
|
|
|
|
|
gd.load();
|
|
|
|
|
|
|
|
{
|
|
|
|
auto def = gd.findObjectType<ObjectData>(1100);
|
|
|
|
|
|
|
|
BOOST_REQUIRE( def );
|
|
|
|
|
|
|
|
BOOST_ASSERT(def->class_type == ObjectInformation::_class("OBJS"));
|
|
|
|
|
|
|
|
BOOST_CHECK_EQUAL( def->modelName, "rd_Corner1" );
|
|
|
|
BOOST_CHECK_EQUAL( def->textureName, "generic" );
|
|
|
|
BOOST_CHECK_EQUAL( def->numClumps, 1 );
|
|
|
|
BOOST_CHECK_EQUAL( def->drawDistance[0], 220 );
|
|
|
|
BOOST_CHECK_EQUAL( def->flags, 0 );
|
|
|
|
}
|
|
|
|
}
|
2016-06-16 22:11:55 +02:00
|
|
|
#endif
|
2015-04-24 19:09:21 +02:00
|
|
|
|
2016-06-16 22:11:55 +02:00
|
|
|
BOOST_AUTO_TEST_SUITE_END()
|