forked from github/server
test_create_castorder can take spelllparameters now too
This commit is contained in:
parent
0e8365c802
commit
29173887b6
3 changed files with 8 additions and 6 deletions
|
@ -34,7 +34,7 @@ static void test_good_dreams(CuTest *tc) {
|
|||
u1 = test_create_unit(f1, r);
|
||||
u2 = test_create_unit(f2, r);
|
||||
|
||||
test_create_castorder(&co, u1, 10, 10., 0);
|
||||
test_create_castorder(&co, u1, 10, 10., 0, NULL);
|
||||
|
||||
level = sp_gooddreams(&co);
|
||||
CuAssertIntEquals(tc, 10, level);
|
||||
|
@ -63,7 +63,7 @@ static void test_dreams(CuTest *tc) {
|
|||
u1 = test_create_unit(f1, r);
|
||||
u2 = test_create_unit(f2, r);
|
||||
|
||||
test_create_castorder(&co, u1, 10, 10., 0);
|
||||
test_create_castorder(&co, u1, 10, 10., 0, NULL);
|
||||
|
||||
sp_gooddreams(&co);
|
||||
sp_baddreams(&co);
|
||||
|
@ -90,7 +90,7 @@ static void test_bad_dreams(CuTest *tc) {
|
|||
u1 = test_create_unit(f1, r);
|
||||
u2 = test_create_unit(f2, r);
|
||||
|
||||
test_create_castorder(&co, u1, 10, 10., 0);
|
||||
test_create_castorder(&co, u1, 10, 10., 0, NULL);
|
||||
|
||||
level = sp_baddreams(&co);
|
||||
CuAssertIntEquals(tc, 10, level);
|
||||
|
|
|
@ -179,12 +179,12 @@ item_type * test_create_itemtype(const char * name) {
|
|||
return itype;
|
||||
}
|
||||
|
||||
void test_create_castorder(castorder *co, unit *u, int level, float force, int range) {
|
||||
void test_create_castorder(castorder *co, unit *u, int level, float force, int range, spellparameter *par) {
|
||||
struct locale * lang;
|
||||
order *ord;
|
||||
|
||||
lang = get_or_create_locale("en");
|
||||
create_castorder(co, u, NULL, NULL, u->region, level, force, range, ord = create_order(K_CAST, lang, ""), NULL);
|
||||
create_castorder(co, u, NULL, NULL, u->region, level, force, range, ord = create_order(K_CAST, lang, ""), par);
|
||||
free_order(ord);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ extern "C" {
|
|||
struct building_type;
|
||||
struct ship_type;
|
||||
struct terrain_type;
|
||||
struct castorder;
|
||||
struct spellparameter;
|
||||
|
||||
struct CuTest;
|
||||
|
||||
|
@ -37,7 +39,7 @@ extern "C" {
|
|||
struct item_type * test_create_itemtype(const char * name);
|
||||
struct ship_type *test_create_shiptype(const char * name);
|
||||
struct building_type *test_create_buildingtype(const char *name);
|
||||
void test_create_castorder(struct castorder *co, struct unit *u, int level, float force, int range);
|
||||
void test_create_castorder(struct castorder *co, struct unit *u, int level, float force, int range, struct spellparameter *par);
|
||||
|
||||
int RunAllTests(void);
|
||||
void test_translate_param(const struct locale *lang, param_t param, const char *text);
|
||||
|
|
Loading…
Reference in a new issue