mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 15:23:01 +01:00
* Update includes in PlatformEnvironment.cpp * Update includes in ParkImporter.h * Update includes of OpenRCT2.h * Update includes in Intro.h * Remove unused include from Input.cpp * Update includes of Imaging.h * Update includes in Game.h * Update includes in Editor.h * Update includes of Context.cpp * Update includes in Cheats.cpp, CmdlineSprite.cpp * Update includes of some source files * Update includes in some cpp files * Update includes in some cpp files * Update includes in TextureCache.h * Fix tests * Update includes in Font.cpp * Update includes in LightFX files * Update some includes * Fix GCC builds * Update some includes * Update some includes * Update includes in FontsFamilies.* * Update includes of Console.h * Improve includes in Window.h * Improve headers in Viewport.h/Window.h * Fix MSVC build * Fix network-less builds * Reduce inclusion of Map.h
53 lines
1.2 KiB
C++
53 lines
1.2 KiB
C++
#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/ParkImporter.h>
|
|
#include <openrct2/ride/Ride.h>
|
|
#include "TestData.h"
|
|
|
|
#include <openrct2/platform/platform.h>
|
|
#include <openrct2/Game.h>
|
|
|
|
using namespace OpenRCT2;
|
|
|
|
TEST(MultiLaunchTest, all)
|
|
{
|
|
std::string path = TestData::GetParkPath("bpb.sv6");
|
|
|
|
gOpenRCT2Headless = true;
|
|
|
|
core_init();
|
|
for (int i = 0; i < 3; i++)
|
|
{
|
|
auto context = CreateContext();
|
|
bool initialised = context->Initialise();
|
|
ASSERT_TRUE(initialised);
|
|
|
|
ParkLoadResult * plr = load_from_sv6(path.c_str());
|
|
|
|
ASSERT_EQ(ParkLoadResult_GetError(plr), PARK_LOAD_ERROR_OK);
|
|
ParkLoadResult_Delete(plr);
|
|
|
|
game_load_init();
|
|
|
|
// Check ride count to check load was successful
|
|
ASSERT_EQ(gRideCount, 134);
|
|
|
|
for (int j = 0; j < 10; j++)
|
|
{
|
|
game_logic_update();
|
|
}
|
|
|
|
// Check ride count again
|
|
ASSERT_EQ(gRideCount, 134);
|
|
|
|
delete context;
|
|
}
|
|
SUCCEED();
|
|
}
|