48 fail_unless(chars->
chars != NULL,
"account_char_add returned NULL on initial character");
52 fail_unless(chars->
chars != NULL,
"account_char_add returned NULL on update character");
53 fail_unless(chars->
chars->
next == NULL,
"account_char_add added to list, not updated existing entry");
56 fail_unless(chars->
chars == NULL,
"account_char_remove returned non NULL on final character removal");
59 fail_unless(chars->
chars != NULL,
"account_char_add returned NULL on initial character");
65 fail_unless(chars->
chars != NULL,
"account_char_add returned NULL on initial character");
66 fail_unless(chars->
chars->
next != NULL,
"account_char_add did not set next pointer!");
89 fail_unless(chars != NULL,
"account_char_load returned NULL");
90 fail_unless(chars->
chars != NULL,
"account_char_load didn't load the file");
94 fail_unless(!strcmp(chars->
chars->
name,
"test character"),
95 "Name for first character is not test char");
98 "Race for first character does not match");
101 "Level for first character is not 2");
103 fail_unless(!strcmp(chars->
chars->
face,
ob->face->name),
104 "Face for first character does not match");
107 "Party for first character is not blank");
109 fail_unless(!strcmp(chars->
chars->
map,
"test map"),
110 "Map for first character does not match");
112 fail_unless(chars->
chars->
next != NULL,
"account_char_load only loaded one character");
120 "Name for second character does not match");
123 "Party for second character does not match");
135 fail_unless(first == second,
"account_char_load should return the same structure for the same name");
143 Suite *s = suite_create(
"account_char");
144 TCase *tc_core = tcase_create(
"Core");
149 suite_add_tcase(s, tc_core);
150 tcase_add_test(tc_core, test_account_char_add);
151 tcase_add_test(tc_core, test_account_char_load);
152 tcase_add_test(tc_core, test_account_char_load_duplicate);
160 SRunner *sr = srunner_create(s);
176 srunner_set_xml(sr, LOGDIR
"/unit/server/account_char.xml");
177 srunner_set_log(sr, LOGDIR
"/unit/server/account_char.out");
178 srunner_run_all(sr, CK_ENV);
179 nf = srunner_ntests_failed(sr);
183 return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;