| 23 | constexpr int32_t updatesToTest = 10; |
| 24 | |
| 25 | TEST(MultiLaunchTest, all) |
| 26 | { |
| 27 | std::string path = TestData::GetParkPath("bpb.sv6"); |
| 28 | |
| 29 | gOpenRCT2Headless = true; |
| 30 | gOpenRCT2NoGraphics = true; |
| 31 | |
| 32 | for (int i = 0; i < 3; i++) |
| 33 | { |
| 34 | auto context = CreateContext(); |
| 35 | bool initialised = context->Initialise(); |
| 36 | ASSERT_TRUE(initialised); |
| 37 | |
| 38 | GetContext()->LoadParkFromFile(path); |
| 39 | GameLoadInit(); |
| 40 | |
| 41 | // Check ride count to check load was successful |
| 42 | ASSERT_EQ(RideGetCount(), 134); |
| 43 | |
| 44 | auto& date = getGameState().date; |
| 45 | // NOTE: This value is saved in the SV6 file, after the import this will be the current state. |
| 46 | // In case the save file gets replaced this needs to be adjusted. |
| 47 | ASSERT_EQ(date.GetMonthTicks(), 0x1e98); |
| 48 | |
| 49 | for (int j = 0; j < updatesToTest; j++) |
| 50 | { |
| 51 | gameStateUpdateLogic(); |
| 52 | } |
| 53 | |
| 54 | ASSERT_EQ(date.GetMonthTicks(), 7862 + updatesToTest); |
| 55 | |
| 56 | // Check ride count again |
| 57 | ASSERT_EQ(RideGetCount(), 134); |
| 58 | } |
| 59 | SUCCEED(); |
| 60 | } |
nothing calls this directly
no test coverage detected