2014-07-28 03:27:55 +02:00
|
|
|
#include <boost/test/unit_test.hpp>
|
|
|
|
#include <data/CutsceneData.hpp>
|
|
|
|
#include <loaders/LoaderCutsceneDAT.hpp>
|
2018-07-06 22:05:43 +02:00
|
|
|
#include <platform/FileHandle.hpp>
|
2017-10-26 03:51:24 +02:00
|
|
|
#include "test_Globals.hpp"
|
2014-07-28 03:27:55 +02:00
|
|
|
|
2019-01-18 02:29:59 +01:00
|
|
|
BOOST_AUTO_TEST_SUITE(CutsceneTests, DATA_TEST_PREDICATE)
|
2014-07-28 03:27:55 +02:00
|
|
|
|
2016-09-09 22:13:22 +02:00
|
|
|
BOOST_AUTO_TEST_CASE(test_load) {
|
|
|
|
{
|
|
|
|
auto d = Global::get().e->data->index.openFile("intro.dat");
|
2014-07-28 03:27:55 +02:00
|
|
|
|
2016-09-09 22:13:22 +02:00
|
|
|
CutsceneTracks tracks;
|
2014-07-28 03:27:55 +02:00
|
|
|
|
2016-09-09 22:13:22 +02:00
|
|
|
LoaderCutsceneDAT loader;
|
2014-07-28 03:27:55 +02:00
|
|
|
|
2016-09-09 22:13:22 +02:00
|
|
|
loader.load(tracks, d);
|
2014-07-28 03:27:55 +02:00
|
|
|
|
2016-09-09 22:13:22 +02:00
|
|
|
BOOST_CHECK(tracks.position.find(0.f) != tracks.position.end());
|
|
|
|
BOOST_CHECK(tracks.position.find(64.8f) != tracks.position.end());
|
2014-07-28 03:27:55 +02:00
|
|
|
|
2016-09-09 22:13:22 +02:00
|
|
|
BOOST_CHECK(tracks.zoom.find(64.8f) != tracks.zoom.end());
|
2014-07-28 03:27:55 +02:00
|
|
|
|
2016-09-09 22:13:22 +02:00
|
|
|
BOOST_CHECK(tracks.zoom.find(64.8f) != tracks.zoom.end());
|
2014-07-28 03:27:55 +02:00
|
|
|
|
2016-09-09 22:13:22 +02:00
|
|
|
BOOST_CHECK(tracks.target.find(64.8f) != tracks.target.end());
|
2014-07-28 03:27:55 +02:00
|
|
|
|
2016-09-09 22:13:22 +02:00
|
|
|
BOOST_CHECK(tracks.duration == 64.8f);
|
|
|
|
}
|
2014-07-28 03:27:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_SUITE_END()
|