1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Fix ride ratings test to work with new Context flow

This commit is contained in:
Ted John
2017-06-03 13:57:40 +01:00
parent f2524c07b3
commit 0662f1630a

View File

@@ -1,9 +1,12 @@
#include <string>
#include <gtest/gtest.h>
#include <openrct2/audio/AudioContext.h>
#include <openrct2/Context.h>
#include <openrct2/core/File.h>
#include <openrct2/core/Path.hpp>
#include <openrct2/core/String.hpp>
#include <openrct2/OpenRCT2.h>
#include <openrct2/ui/UiContext.h>
#include "TestData.h"
extern "C"
@@ -12,6 +15,10 @@ extern "C"
#include <openrct2/game.h>
}
using namespace OpenRCT2;
using namespace OpenRCT2::Audio;
using namespace OpenRCT2::Ui;
class RideRatings : public testing::Test
{
protected:
@@ -57,8 +64,12 @@ TEST_F(RideRatings, all)
std::string path = TestData::GetParkPath("bpb.sv6");
gOpenRCT2Headless = true;
core_init();
openrct2_initialise();
auto context = CreateContext();
bool initialised = context->Initialise();
ASSERT_TRUE(initialised);
game_load_sv6_path(path.c_str());
// Check ride count to check load was successful
@@ -85,5 +96,5 @@ TEST_F(RideRatings, all)
}
}
openrct2_dispose();
delete context;
}