Crossfire Server, Trunk
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)
 
static void teardown (void)
 

Macro Definition Documentation

◆ ARCHS

#define ARCHS   3

◆ GENERATE

#define GENERATE   0

◆ TESTS

#define TESTS   50

Function Documentation

◆ living_suite()

static END_TEST Suite* living_suite ( void  )
static

Definition at line 302 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:

◆ main()

int main ( void  )

Definition at line 316 of file check_living.c.

References living_suite().

+ Here is the call graph for this function:

◆ setup()

static void setup ( void  )
static

Definition at line 12 of file check_living.c.

References cctk_init_std_archetypes(), 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()

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 31 of file check_living.c.

References curse_on_apply::ac, ARCHS, create_archetype(), fix_object(), FREE_OBJ_FREE_INVENTORY, obj::level, guildjoin::ob, object_free(), object_insert_in_ob(), altar_valkyrie::pl, PLAYER, stringbuffer_append_printf(), stringbuffer_append_string(), stringbuffer_finish(), stringbuffer_new(), and TESTS.

+ Here is the call graph for this function:

◆ teardown()

static void teardown ( void  )
static

Definition at line 19 of file check_living.c.

Referenced by living_suite().

+ Here is the caller graph for this function: