forked from github/server
moved convenience function for convenience
the formerly static function test_create_castorder is now available for general usage via tests.h/.c
This commit is contained in:
parent
f550431118
commit
0e8365c802
3 changed files with 10 additions and 10 deletions
|
@ -19,16 +19,6 @@
|
|||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
static void test_create_castorder(castorder *co, unit *u, int level, float force, int range) {
|
||||
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);
|
||||
free_order(ord);
|
||||
}
|
||||
|
||||
static void test_good_dreams(CuTest *tc) {
|
||||
struct region *r;
|
||||
struct faction *f1, *f2;
|
||||
|
|
|
@ -179,6 +179,15 @@ item_type * test_create_itemtype(const char * name) {
|
|||
return itype;
|
||||
}
|
||||
|
||||
void test_create_castorder(castorder *co, unit *u, int level, float force, int range) {
|
||||
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);
|
||||
free_order(ord);
|
||||
}
|
||||
|
||||
void test_translate_param(const struct locale *lang, param_t param, const char *text) {
|
||||
struct critbit_tree **cb;
|
||||
|
||||
|
|
|
@ -37,6 +37,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);
|
||||
|
||||
int RunAllTests(void);
|
||||
void test_translate_param(const struct locale *lang, param_t param, const char *text);
|
||||
|
|
Loading…
Reference in a new issue