Crossfire Server, Trunk  R20513
Macros | Functions
check_living.c File Reference
#include "global.h"
#include <check.h>
#include <stdlib.h>
#include "toolkit_common.h"
Include dependency graph for check_living.c:

Go to the source code of this file.

Macros

#define ARCHS   3
 
#define GENERATE   0
 
#define TESTS   50
 

Functions

static END_TEST Suite * living_suite (void)
 
int main (void)
 
static void setup (void)
 
 START_TEST (test_fix_object)
 Note that the test and results here make assumptions about certain values that can change. More...
 
static void teardown (void)
 

Macro Definition Documentation

#define ARCHS   3

Referenced by START_TEST().

#define GENERATE   0
#define TESTS   50

Referenced by START_TEST().

Function Documentation

static END_TEST Suite* living_suite ( void  )
static

Definition at line 303 of file check_living.c.

References setup(), and teardown().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( void  )

Definition at line 316 of file check_living.c.

References living_suite().

Here is the call graph for this function:

static void setup ( void  )
static

Definition at line 12 of file check_living.c.

References cctk_init_std_archetypes(), cctk_setconfdir(), cctk_setdatadir(), cctk_setlog(), and init_experience().

Referenced by living_suite().

Here is the call graph for this function:

Here is the caller graph for this function:

START_TEST ( test_fix_object  )

Note that the test and results here make assumptions about certain values that can change.

For example, if maximum level (in the exp file) is lower, the results may not match expected results. Likewise, if any of the stat bonuses are changed, these results also will not match.

It could be nice to put all these into a structure, so the actual values for each test are in the same structure element.

First group of arrays here are the values that should be returned from the test - basically the output values.

Follow group of arrays are values to use for the different attributes - in other word, basically the input values.

if you want to generate the test results, change 0 to 1 and run this test.

Definition at line 32 of file check_living.c.

References liv::ac, ARCHS, liv::Con, obj::contr, create_archetype(), fix_object(), FREE_OBJ_FREE_INVENTORY, liv::Int, obj::level, liv::maxgrace, liv::maxhp, liv::maxsp, object_free2(), object_insert_in_ob(), pl::orig_stats, PLAYER, liv::Pow, obj::stats, stringbuffer_append_printf(), stringbuffer_append_string(), stringbuffer_finish(), stringbuffer_new(), TESTS, obj::type, liv::wc, and liv::Wis.

Here is the call graph for this function:

static void teardown ( void  )
static

Definition at line 20 of file check_living.c.

Referenced by living_suite().

Here is the caller graph for this function: