| 7 | using GameTest = RadiantTest; |
| 8 | |
| 9 | TEST_F(GameTest, GetCurrentGameConfig) |
| 10 | { |
| 11 | // Check that we can get the game manager and current game without crashing or anything |
| 12 | auto& mgr = GlobalGameManager(); |
| 13 | auto game = mgr.currentGame(); |
| 14 | ASSERT_TRUE(game); |
| 15 | |
| 16 | // RadiantTest sets up a test game type which should be exposed via the GameManager |
| 17 | auto conf = mgr.getConfig(); |
| 18 | EXPECT_EQ(conf.gameType, RadiantTest::DEFAULT_GAME_TYPE); |
| 19 | |
| 20 | // The start of the engine path could be anywhere (depending on where the test binaries are |
| 21 | // being run from), but it should end with "resources/tdm" |
| 22 | auto pathComps = string::splitToVec(conf.enginePath, "/"); |
| 23 | EXPECT_GE(pathComps.size(), 2); |
| 24 | EXPECT_EQ(pathComps.at(pathComps.size() - 1), "tdm"); |
| 25 | EXPECT_EQ(pathComps.at(pathComps.size() - 2), "resources"); |
| 26 | } |
| 27 | |
| 28 | TEST_F(GameTest, GetGameList) |
| 29 | { |
nothing calls this directly
no test coverage detected