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

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 146 of file check_friend.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 168 of file check_friend.c.

References friend_suite().

+ Here is the call graph for this function:

◆ setup()

void setup ( void  )

Definition at line 38 of file check_friend.c.

Referenced by friend_suite().

+ Here is the caller graph for this function:

◆ START_TEST() [1/10]

START_TEST ( test_basic  )

Definition at line 45 of file check_friend.c.

References add_friendly_object(), 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 56 of file check_friend.c.

References add_friendly_object(), clean_friendly_list(), 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 65 of file check_friend.c.

References add_friendly_object(), clean_friendly_list(), 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 74 of file check_friend.c.

References add_friendly_object(), clean_friendly_list(), CLEAR_FLAG, 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 83 of file check_friend.c.

References add_friendly_object(), 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 97 of file check_friend.c.

References add_friendly_object(), CLEAR_FLAG, 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 109 of file check_friend.c.

References add_friendly_object(), CLEAR_FLAG, 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 123 of file check_friend.c.

References 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 128 of file check_friend.c.

References add_friendly_object(), 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 136 of file check_friend.c.

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

+ Here is the call graph for this function:

◆ teardown()

void teardown ( void  )

Definition at line 41 of file check_friend.c.

References clear_friendly_list().

Referenced by friend_suite().

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