mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix MultiLaunch test.
This commit is contained in:
committed by
Aaron van Geffen
parent
eb62e26773
commit
afdcd35fb9
@@ -5,6 +5,7 @@
|
||||
#include <openrct2/core/File.h>
|
||||
#include <openrct2/core/Path.hpp>
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/GameState.h>
|
||||
#include <openrct2/OpenRCT2.h>
|
||||
#include <openrct2/ParkImporter.h>
|
||||
#include <openrct2/ride/Ride.h>
|
||||
@@ -15,6 +16,8 @@
|
||||
|
||||
using namespace OpenRCT2;
|
||||
|
||||
constexpr sint32 updatesToTest = 10;
|
||||
|
||||
TEST(MultiLaunchTest, all)
|
||||
{
|
||||
std::string path = TestData::GetParkPath("bpb.sv6");
|
||||
@@ -34,12 +37,18 @@ TEST(MultiLaunchTest, all)
|
||||
|
||||
// Check ride count to check load was successful
|
||||
ASSERT_EQ(gRideCount, 134);
|
||||
auto gs = context->GetGameState();
|
||||
ASSERT_NE(gs, nullptr);
|
||||
auto date = gs->GetDate();
|
||||
ASSERT_EQ(date->GetMonthTicks(), 0);
|
||||
|
||||
for (int j = 0; j < 10; j++)
|
||||
for (int j = 0; j < updatesToTest; j++)
|
||||
{
|
||||
game_logic_update();
|
||||
gs->UpdateLogic();
|
||||
}
|
||||
|
||||
ASSERT_EQ(date->GetMonthTicks(), 7862 + updatesToTest);
|
||||
|
||||
// Check ride count again
|
||||
ASSERT_EQ(gRideCount, 134);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user