45 strcpy(
pl->maplevel,
"test map");
48 FAIL_UNLESS(chars->
chars.size() == 1,
"account_char_add returned empty list on initial character");
52 FAIL_UNLESS(chars->
chars.size() == 1,
"account_char_add didn't on update character");
55 FAIL_UNLESS(chars->
chars.empty(),
"account_char_remove returned non empty list on final character removal");
58 FAIL_UNLESS(chars->
chars.size() == 1,
"account_char_add didn't insert initial character");
64 FAIL_UNLESS(chars->
chars.size() == 2,
"account_char_add didn't add character");
87 FAIL_UNLESS(chars != NULL,
"account_char_load returned NULL");
88 FAIL_UNLESS(chars->
chars.size() == 2,
"account_char_load didn't load the file");
93 "Name for first character is not test char");
96 "Race for first character does not match");
99 "Level for first character is not 2");
102 "Face for first character does not match");
105 "Party for first character is not blank");
108 "Map for first character does not match");
116 "Name for second character does not match");
119 "Party for second character does not match");
131 FAIL_UNLESS(first == second,
"account_char_load should return the same structure for the same name");
139 Suite *s = suite_create(
"account_char");
140 TCase *tc_core = tcase_create(
"Core");
145 suite_add_tcase(s, tc_core);
146 tcase_add_test(tc_core, test_account_char_add);
147 tcase_add_test(tc_core, test_account_char_load);
148 tcase_add_test(tc_core, test_account_char_load_duplicate);
156 SRunner *sr = srunner_create(s);
172 srunner_set_xml(sr, LOGDIR
"/unit/server/account_char.xml");
173 srunner_set_log(sr, LOGDIR
"/unit/server/account_char.out");
174 srunner_run_all(sr, CK_ENV);
175 nf = srunner_ntests_failed(sr);
179 return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;