test_inventory.c File Reference

#include "CUnit/Basic.h"
#include "test_inventory.h"
#include "test_shared.h"
#include "../common/common.h"
#include "../game/inventory.h"
Include dependency graph for test_inventory.c:

Go to the source code of this file.

Functions

static void FreeInventory (void *data)
static void * AllocInventoryMemory (size_t size)
static void FreeAllInventory (void)
static void ResetInventoryList (void)
static int UFO_InitSuiteInventory (void)
static int UFO_CleanSuiteInventory (void)
static void testItemAdd (void)
static void testItemDel (void)
static void testItemMove (void)
static qboolean testAddSingle (inventory_t *inv, objDef_t *od, invDef_t *container)
static void testItemMassActions (void)
int UFO_AddInventoryTests (void)

Variables

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

Detailed Description

Definition in file test_inventory.c.


Function Documentation

static void* AllocInventoryMemory ( size_t  size  )  [static]

Definition at line 40 of file test_inventory.c.

References com_genericPool, Mem_PoolAlloc, and TAG_INVENTORY.

static void FreeAllInventory ( void   )  [static]

Definition at line 45 of file test_inventory.c.

References com_genericPool, Mem_FreeTag, and TAG_INVENTORY.

static void FreeInventory ( void *  data  )  [static]

Definition at line 35 of file test_inventory.c.

References Mem_Free.

static void ResetInventoryList ( void   )  [inline, static]
static qboolean testAddSingle ( inventory_t inv,
objDef_t od,
invDef_t container 
) [static]
static void testItemAdd ( void   )  [static]
static void testItemDel ( void   )  [static]
static void testItemMassActions ( void   )  [static]
static void testItemMove ( void   )  [static]
int UFO_AddInventoryTests ( void   ) 
static int UFO_CleanSuiteInventory ( void   )  [static]

The suite cleanup function. Returns zero on success, non-zero otherwise.

Definition at line 75 of file test_inventory.c.

References TEST_Shutdown().

Referenced by UFO_AddInventoryTests().

static int UFO_InitSuiteInventory ( void   )  [static]

The suite initialization function. Returns zero on success, non-zero otherwise.

Definition at line 62 of file test_inventory.c.

References Com_ParseScripts(), qfalse, and TEST_Init().

Referenced by UFO_AddInventoryTests().


Variable Documentation

Definition at line 32 of file test_inventory.c.

const inventoryImport_t inventoryImport = { FreeInventory, FreeAllInventory, AllocInventoryMemory } [static]

Definition at line 50 of file test_inventory.c.

const int TAG_INVENTORY = 5546 [static]

Definition at line 33 of file test_inventory.c.

Referenced by AllocInventoryMemory(), and FreeAllInventory().


Generated by  doxygen 1.6.2