UFO: Alien Invasion
Loading...
Searching...
No Matches
test_game.cpp File Reference

Test cases for code about server game logic. More...

Include dependency graph for test_game.cpp:

Go to the source code of this file.

Data Structures

class  GameTest

Functions

 TEST_F (GameTest, SpawnAndConnect)
 TEST_F (GameTest, CountSpawnpointsStatic)
 TEST_F (GameTest, CountSpawnpointsRMA)
 TEST_F (GameTest, DoorTrigger)
 TEST_F (GameTest, Shooting)
static int GAMETEST_GetItemCount (const Edict *ent, containerIndex_t container)
 TEST_F (GameTest, VisFlags)
 TEST_F (GameTest, InventoryForDiedAlien)
 TEST_F (GameTest, InventoryWithTwoDiedAliensOnTheSameGridTile)
 TEST_F (GameTest, InventoryTempContainerLinks)

Variables

static int mapCount = 0

Detailed Description

Test cases for code about server game logic.

Definition in file test_game.cpp.

Function Documentation

◆ GAMETEST_GetItemCount()

int GAMETEST_GetItemCount ( const Edict * ent,
containerIndex_t container )
static

Definition at line 654 of file test_game.cpp.

References count, Item::getAmount(), Edict::getContainer(), and Item::getNext().

Referenced by TEST_F(), and TEST_F().

◆ TEST_F() [1/9]

◆ TEST_F() [2/9]

TEST_F ( GameTest ,
CountSpawnpointsStatic  )

◆ TEST_F() [3/9]

TEST_F ( GameTest ,
DoorTrigger  )

◆ TEST_F() [4/9]

◆ TEST_F() [5/9]

◆ TEST_F() [6/9]

◆ TEST_F() [7/9]

TEST_F ( GameTest ,
Shooting  )
Todo
equip the soldier
Todo
set the input variables – gi.ReadFormat(format, &pos, &i, &firemode, &from);
Todo
do the shot – G_ClientShoot(player, ent, pos, i, firemode, &mock, true, from);
Todo
implement the test here - e.g. extend shot_mock_t

Definition at line 643 of file test_game.cpp.

References FS_CheckFile(), mapName, and SV_Map().

◆ TEST_F() [8/9]

◆ TEST_F() [9/9]

Variable Documentation

◆ mapCount