MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / TEST_F

Function TEST_F

test/Game.cpp:9–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7using GameTest = RadiantTest;
8
9TEST_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
28TEST_F(GameTest, GetGameList)
29{

Callers

nothing calls this directly

Calls 8

splitToVecFunction · 0.85
hasFeatureMethod · 0.80
currentGameMethod · 0.45
sizeMethod · 0.45
getNameMethod · 0.45
getKeyValueMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected