|
UFO: Alien Invasion
|
Test cases for code about server game logic. More...
#include "test_shared.h"#include "../shared/ufotypes.h"#include "../game/g_local.h"#include "../game/g_actor.h"#include "../game/g_client.h"#include "../game/g_edicts.h"#include "../game/g_inventory.h"#include "../game/g_move.h"#include "../server/server.h"#include "../client/renderer/r_state.h"
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 |
Test cases for code about server game logic.
Definition in file test_game.cpp.
|
static |
Definition at line 654 of file test_game.cpp.
References count, Item::getAmount(), Edict::getContainer(), and Item::getNext().
| TEST_F | ( | GameTest | , |
| CountSpawnpointsRMA | ) |
Definition at line 576 of file test_game.cpp.
References Com_Printf(), mapDef_t::id, mapCount, MapDef_Foreach, mapDef_t::mapTheme, Q_streq, SV_ShutdownGameProgs(), TEST_ExistsProperty(), and TEST_GetStringProperty().
| TEST_F | ( | GameTest | , |
| CountSpawnpointsStatic | ) |
Definition at line 555 of file test_game.cpp.
References Com_Printf(), mapCount, MapDef_Foreach, mapDef_t::mapTheme, and TEST_ExistsProperty().
| TEST_F | ( | GameTest | , |
| DoorTrigger | ) |
Definition at line 616 of file test_game.cpp.
References Edict::doorState, ET_DOOR, FS_CheckFile(), G_EdictsGetNextInUse(), mapName, Q_streq, SV_Map(), Edict::targetname, and Edict::type.
| TEST_F | ( | GameTest | , |
| InventoryForDiedAlien | ) |
Definition at line 691 of file test_game.cpp.
References Edict::chr, CID_BACKPACK, CID_FLOOR, Com_Printf(), count, Item::def(), Inventory::findSpace(), FS_CheckFile(), G_ActorDieOrStun(), G_ActorInvMove(), G_ClientMove(), G_EdictsGetNextLivingActorOfTeam(), G_GetFloorItems(), G_InventoryToFloor(), G_IsAIPlayer, GAMETEST_GetItemCount(), Edict::getContainer(), Edict::getFloor(), Edict::getPlayer(), Edict::HP, character_t::inv, INVDEF, Actor::isDead(), level, mapName, objDef_t::name, NONE, Edict::pos, SV_Map(), TEAM_ALIEN, and VectorCompare.
| TEST_F | ( | GameTest | , |
| InventoryTempContainerLinks | ) |
Definition at line 821 of file test_game.cpp.
References Edict::chr, CID_ARMOUR, CID_FLOOR, Container::countItems(), FS_CheckFile(), G_EdictsGetNextLivingActorOfTeam(), G_GetFloorItemFromPos(), G_InventoryToFloor(), Edict::getFloor(), Inventory::getNextCont(), Container::id, character_t::inv, level, mapName, Edict::pos, SV_Map(), and TEAM_ALIEN.
| TEST_F | ( | GameTest | , |
| InventoryWithTwoDiedAliensOnTheSameGridTile | ) |
Definition at line 748 of file test_game.cpp.
References Edict::chr, CID_BACKPACK, CID_FLOOR, Com_Printf(), count, Item::def(), Inventory::findSpace(), FS_CheckFile(), G_ActorDieOrStun(), G_ActorInvMove(), G_ClientMove(), G_EdictsGetNextLivingActorOfTeam(), G_GetFloorItems(), G_InventoryToFloor(), G_IsAIPlayer, GAMETEST_GetItemCount(), Edict::getContainer(), Edict::getFloor(), Edict::getPlayer(), Edict::HP, character_t::inv, INVDEF, Actor::isDead(), level, mapName, objDef_t::name, NONE, Edict::pos, SV_Map(), TEAM_ALIEN, and VectorCompare.
| TEST_F | ( | GameTest | , |
| Shooting | ) |
Definition at line 643 of file test_game.cpp.
References FS_CheckFile(), mapName, and SV_Map().
| TEST_F | ( | GameTest | , |
| SpawnAndConnect | ) |
Definition at line 78 of file test_game.cpp.
References Edict::classname, Com_Printf(), FS_FreeFile(), FS_LoadFile(), G_EdictsGetNextInUse(), G_PlayerGetNextHuman(), MAX_INFO_STRING, name, SV_ClearWorld(), SV_InitGameProgs(), and svs.
| TEST_F | ( | GameTest | , |
| VisFlags | ) |
Definition at line 666 of file test_game.cpp.
References Com_UnsignedIntToBinary(), FS_CheckFile(), G_EdictsGetNextLivingActorOfTeam(), G_TeamToVisMask, Edict::getTeam(), mapName, Mem_Free, Mem_StrDup, SV_Map(), TEAM_ALIEN, and Edict::visflags.
|
static |
Definition at line 37 of file test_game.cpp.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), GameTest::testCountSpawnpointsForMapInMultiplayerMode(), and GameTest::testCountSpawnpointsForMapInSingleplayerMode().