2015-04-29 22:03:53 +02:00
|
|
|
#include <boost/test/unit_test.hpp>
|
|
|
|
#include <engine/GameWorld.hpp>
|
|
|
|
#include <engine/GameData.hpp>
|
2015-05-01 03:04:23 +02:00
|
|
|
#include <objects/InstanceObject.hpp>
|
2015-04-29 22:03:53 +02:00
|
|
|
#include <test_globals.hpp>
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_SUITE(GameWorldTests)
|
|
|
|
|
2016-06-16 22:11:55 +02:00
|
|
|
#if RW_TEST_WITH_DATA
|
2015-04-29 22:03:53 +02:00
|
|
|
BOOST_AUTO_TEST_CASE(test_gameobject_id)
|
|
|
|
{
|
2015-05-01 03:04:23 +02:00
|
|
|
GameWorld gw(&Global::get().log, &Global::get().work, Global::get().d);
|
2015-04-29 22:03:53 +02:00
|
|
|
|
|
|
|
auto object1 = gw.createInstance(1337, glm::vec3(100.f, 0.f, 0.f));
|
2015-05-01 03:04:23 +02:00
|
|
|
auto object2 = gw.createInstance(1337, glm::vec3(100.f, 0.f, 100.f));
|
2015-04-29 22:03:53 +02:00
|
|
|
|
2015-05-01 03:04:23 +02:00
|
|
|
BOOST_CHECK_NE( object1->getGameObjectID(), object2->getGameObjectID() );
|
2015-04-29 22:03:53 +02:00
|
|
|
}
|
2016-06-16 22:11:55 +02:00
|
|
|
#endif
|
2015-04-29 22:03:53 +02:00
|
|
|
|
2016-06-16 22:11:55 +02:00
|
|
|
BOOST_AUTO_TEST_SUITE_END()
|