Crossfire Server, Trunk
check_friend.cpp File Reference
#include <stdlib.h>
#include <check.h>
#include "global.h"
#include "libproto.h"
#include "toolkit_common.h"
+ Include dependency graph for check_friend.cpp:

Go to the source code of this file.

Functions

END_TEST Suite * friend_suite (void)
 
int main (void)
 
void setup (void)
 
 START_TEST (test_basic)
 
END_TEST START_TEST (test_clean_friendly_list_count)
 
END_TEST START_TEST (test_clean_friendly_list_freed)
 
END_TEST START_TEST (test_clean_friendly_list_not_friendly)
 
END_TEST START_TEST (test_get_friends_of_null)
 
END_TEST START_TEST (test_get_friends_of_owner)
 
END_TEST START_TEST (test_get_friends_of_owner_only)
 
END_TEST START_TEST (test_get_next_friend_none)
 
END_TEST START_TEST (test_get_next_friend_single)
 
END_TEST START_TEST (test_get_next_friend_two)
 
void teardown (void)
 

Function Documentation

◆ friend_suite()

END_TEST Suite* friend_suite ( void  )

Definition at line 147 of file check_friend.cpp.

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 169 of file check_friend.cpp.

References friend_suite().

+ Here is the call graph for this function:

◆ setup()

void setup ( void  )

Definition at line 39 of file check_friend.cpp.

Referenced by friend_suite().

+ Here is the caller graph for this function:

◆ START_TEST() [1/10]

START_TEST ( test_basic  )

Definition at line 46 of file check_friend.cpp.

References add_friendly_object(), FAIL_UNLESS, FLAG_FRIENDLY, is_friendly(), guildjoin::ob, object_new(), QUERY_FLAG, remove_friendly_object(), and SET_FLAG.

+ Here is the call graph for this function:

◆ START_TEST() [2/10]

END_TEST START_TEST ( test_clean_friendly_list_count  )

Definition at line 57 of file check_friend.cpp.

References add_friendly_object(), clean_friendly_list(), FAIL_UNLESS, is_friendly(), guildjoin::ob, and object_new().

+ Here is the call graph for this function:

◆ START_TEST() [3/10]

END_TEST START_TEST ( test_clean_friendly_list_freed  )

Definition at line 66 of file check_friend.cpp.

References add_friendly_object(), clean_friendly_list(), FAIL_UNLESS, FLAG_FREED, is_friendly(), guildjoin::ob, object_new(), and SET_FLAG.

+ Here is the call graph for this function:

◆ START_TEST() [4/10]

END_TEST START_TEST ( test_clean_friendly_list_not_friendly  )

Definition at line 75 of file check_friend.cpp.

References add_friendly_object(), clean_friendly_list(), CLEAR_FLAG, FAIL_UNLESS, FLAG_FRIENDLY, is_friendly(), guildjoin::ob, and object_new().

+ Here is the call graph for this function:

◆ START_TEST() [5/10]

END_TEST START_TEST ( test_get_friends_of_null  )

Definition at line 84 of file check_friend.cpp.

References add_friendly_object(), FAIL_UNLESS, get_friends_of(), guildoracle::list, guildjoin::ob, and object_new().

+ Here is the call graph for this function:

◆ START_TEST() [6/10]

END_TEST START_TEST ( test_get_friends_of_owner  )

Definition at line 98 of file check_friend.cpp.

References add_friendly_object(), CLEAR_FLAG, FAIL_UNLESS, FLAG_REMOVED, get_friends_of(), guildoracle::list, guildjoin::ob, object_new(), and object_set_owner().

+ Here is the call graph for this function:

◆ START_TEST() [7/10]

END_TEST START_TEST ( test_get_friends_of_owner_only  )

Definition at line 110 of file check_friend.cpp.

References add_friendly_object(), CLEAR_FLAG, FAIL_UNLESS, FLAG_REMOVED, get_friends_of(), guildoracle::list, guildjoin::ob, object_new(), and object_set_owner().

+ Here is the call graph for this function:

◆ START_TEST() [8/10]

END_TEST START_TEST ( test_get_next_friend_none  )

Definition at line 124 of file check_friend.cpp.

References FAIL_UNLESS, and get_next_friend().

+ Here is the call graph for this function:

◆ START_TEST() [9/10]

END_TEST START_TEST ( test_get_next_friend_single  )

Definition at line 129 of file check_friend.cpp.

References add_friendly_object(), FAIL_UNLESS, get_next_friend(), guildjoin::ob, and object_new().

+ Here is the call graph for this function:

◆ START_TEST() [10/10]

END_TEST START_TEST ( test_get_next_friend_two  )

Definition at line 137 of file check_friend.cpp.

References add_friendly_object(), FAIL_UNLESS, get_next_friend(), guildjoin::ob, and object_new().

+ Here is the call graph for this function:

◆ teardown()

void teardown ( void  )

Definition at line 42 of file check_friend.cpp.

References clear_friendly_list().

Referenced by friend_suite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: