UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
test_inventory.cpp File Reference
#include "test_shared.h"
#include "../common/common.h"
#include "../game/inventory.h"

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

static void* AllocInventoryMemory ( size_t  size)
static

Definition at line 38 of file test_inventory.cpp.

References com_genericPool, Mem_PoolAlloc, and TAG_INVENTORY.

static void FreeAllInventory ( void  )
static

Definition at line 43 of file test_inventory.cpp.

References com_genericPool, Mem_FreeTag, and TAG_INVENTORY.

static void FreeInventory ( void data)
static

Definition at line 33 of file test_inventory.cpp.

References Mem_Free.

static void ResetInventoryList ( void  )
inlinestatic
static bool testAddSingle ( Inventory inv,
const objDef_t od,
const invDef_t container 
)
static

Definition at line 219 of file test_inventory.cpp.

References InventoryInterface::tryAddToInventory().

Referenced by TEST_F().

Variable Documentation

Definition at line 30 of file test_inventory.cpp.

Definition at line 48 of file test_inventory.cpp.

const int TAG_INVENTORY = 5546
static

Definition at line 31 of file test_inventory.cpp.

Referenced by AllocInventoryMemory(), and FreeAllInventory().