UFO: Alien Invasion
Loading...
Searching...
No Matches
test_inventory.cpp File Reference
#include "test_shared.h"
#include "../common/common.h"
#include "../game/inventory.h"
Include dependency graph for test_inventory.cpp:

Go to the source code of this file.

Data Structures

class  InventoryTest

Functions

static void FreeInventory (void *data)
static voidAllocInventoryMemory (size_t size)
static void FreeAllInventory (void)
static void ResetInventoryList (void)
 TEST_F (InventoryTest, ItemAdd)
 TEST_F (InventoryTest, ItemDel)
 TEST_F (InventoryTest, ItemMove)
 TEST_F (InventoryTest, ItemReload)
static bool testAddSingle (Inventory *inv, const objDef_t *od, const invDef_t *container)
 TEST_F (InventoryTest, ItemMassActions)
 TEST_F (InventoryTest, ItemToHeadgear)

Variables

static InventoryInterface i
static const int TAG_INVENTORY = 5546
static const inventoryImport_t inventoryImport = { FreeInventory, FreeAllInventory, AllocInventoryMemory }

Function Documentation

◆ AllocInventoryMemory()

void * AllocInventoryMemory ( size_t size)
static

Definition at line 38 of file test_inventory.cpp.

References com_genericPool, Mem_PoolAlloc, and TAG_INVENTORY.

◆ FreeAllInventory()

void FreeAllInventory ( void )
static

Definition at line 43 of file test_inventory.cpp.

References com_genericPool, Mem_FreeTag, and TAG_INVENTORY.

◆ FreeInventory()

void FreeInventory ( void * data)
static

Definition at line 33 of file test_inventory.cpp.

References data, and Mem_Free.

◆ ResetInventoryList()

void ResetInventoryList ( void )
inlinestatic

Definition at line 50 of file test_inventory.cpp.

References csi, i, and inventoryImport.

Referenced by InventoryTest::SetUp().

◆ TEST_F() [1/6]

◆ TEST_F() [2/6]

◆ TEST_F() [3/6]

◆ TEST_F() [4/6]

◆ TEST_F() [5/6]

◆ TEST_F() [6/6]

◆ testAddSingle()

bool testAddSingle ( Inventory * inv,
const objDef_t * od,
const invDef_t * container )
static

Definition at line 219 of file test_inventory.cpp.

References i.

Referenced by TEST_F().

Variable Documentation

◆ i

Definition at line 30 of file test_inventory.cpp.

◆ inventoryImport

Definition at line 48 of file test_inventory.cpp.

◆ TAG_INVENTORY

const int TAG_INVENTORY = 5546
static

Definition at line 31 of file test_inventory.cpp.