2014-07-28 03:27:55 +02:00
|
|
|
#include <boost/test/unit_test.hpp>
|
|
|
|
#include <data/CutsceneData.hpp>
|
|
|
|
#include <loaders/LoaderCutsceneDAT.hpp>
|
|
|
|
#include "test_globals.hpp"
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_SUITE(CutsceneTests)
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_CASE(test_load)
|
|
|
|
{
|
|
|
|
{
|
2015-03-06 05:38:22 +01:00
|
|
|
auto d = Global::get().e->gameData.openFile("intro.dat");
|
2014-07-28 03:27:55 +02:00
|
|
|
|
|
|
|
CutsceneTracks tracks;
|
|
|
|
|
|
|
|
LoaderCutsceneDAT loader;
|
|
|
|
|
|
|
|
loader.load( tracks, d );
|
|
|
|
|
|
|
|
BOOST_CHECK( tracks.position.find(0.f) != tracks.position.end() );
|
|
|
|
BOOST_CHECK( tracks.position.find(64.8f) != tracks.position.end() );
|
|
|
|
|
|
|
|
BOOST_CHECK( tracks.zoom.find(64.8f) != tracks.zoom.end() );
|
|
|
|
|
|
|
|
BOOST_CHECK( tracks.zoom.find(64.8f) != tracks.zoom.end() );
|
|
|
|
|
|
|
|
BOOST_CHECK( tracks.target.find(64.8f) != tracks.target.end() );
|
|
|
|
|
|
|
|
BOOST_CHECK( tracks.duration == 64.8f );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_SUITE_END()
|