forked from github/server
formatting: tabs --> spaces
This commit is contained in:
parent
bebc92f82d
commit
91155f509c
1 changed files with 22 additions and 22 deletions
|
@ -19,10 +19,10 @@ static void test_manacrystal(CuTest *tc) {
|
||||||
static void test_skillpotion(CuTest *tc) {
|
static void test_skillpotion(CuTest *tc) {
|
||||||
unit *u;
|
unit *u;
|
||||||
const struct item_type *itype;
|
const struct item_type *itype;
|
||||||
skill* pSkill = NULL;
|
skill* pSkill = NULL;
|
||||||
int initialWeeks_Entertainment = 0;
|
int initialWeeks_Entertainment = 0;
|
||||||
int initialWeeks_Stamina = 0;
|
int initialWeeks_Stamina = 0;
|
||||||
int initialWeeks_Magic = 0;
|
int initialWeeks_Magic = 0;
|
||||||
|
|
||||||
test_cleanup();
|
test_cleanup();
|
||||||
test_create_world();
|
test_create_world();
|
||||||
|
@ -30,31 +30,31 @@ static void test_skillpotion(CuTest *tc) {
|
||||||
itype = test_create_itemtype("skillpotion");
|
itype = test_create_itemtype("skillpotion");
|
||||||
change_resource(u, itype->rtype, 2);
|
change_resource(u, itype->rtype, 2);
|
||||||
|
|
||||||
learn_skill(u, SK_ENTERTAINMENT, 1.0);
|
learn_skill(u, SK_ENTERTAINMENT, 1.0);
|
||||||
pSkill = unit_skill(u, SK_ENTERTAINMENT);
|
pSkill = unit_skill(u, SK_ENTERTAINMENT);
|
||||||
sk_set(pSkill, 5);
|
sk_set(pSkill, 5);
|
||||||
initialWeeks_Entertainment = pSkill->weeks;
|
initialWeeks_Entertainment = pSkill->weeks;
|
||||||
|
|
||||||
learn_skill(u, SK_STAMINA, 1.0);
|
learn_skill(u, SK_STAMINA, 1.0);
|
||||||
pSkill = unit_skill(u, SK_STAMINA);
|
pSkill = unit_skill(u, SK_STAMINA);
|
||||||
sk_set(pSkill, 5);
|
sk_set(pSkill, 5);
|
||||||
initialWeeks_Stamina = pSkill->weeks;
|
initialWeeks_Stamina = pSkill->weeks;
|
||||||
|
|
||||||
learn_skill(u, SK_MAGIC, 1.0);
|
learn_skill(u, SK_MAGIC, 1.0);
|
||||||
pSkill = unit_skill(u, SK_MAGIC);
|
pSkill = unit_skill(u, SK_MAGIC);
|
||||||
sk_set(pSkill, 5);
|
sk_set(pSkill, 5);
|
||||||
initialWeeks_Magic = pSkill->weeks;
|
initialWeeks_Magic = pSkill->weeks;
|
||||||
|
|
||||||
CuAssertIntEquals(tc, 1, use_skillpotion(u, itype, 1, NULL));
|
CuAssertIntEquals(tc, 1, use_skillpotion(u, itype, 1, NULL));
|
||||||
|
|
||||||
pSkill = unit_skill(u, SK_ENTERTAINMENT);
|
pSkill = unit_skill(u, SK_ENTERTAINMENT);
|
||||||
CuAssertIntEquals(tc, initialWeeks_Entertainment - 3, pSkill->weeks);
|
CuAssertIntEquals(tc, initialWeeks_Entertainment - 3, pSkill->weeks);
|
||||||
|
|
||||||
pSkill = unit_skill(u, SK_STAMINA);
|
pSkill = unit_skill(u, SK_STAMINA);
|
||||||
CuAssertIntEquals(tc, initialWeeks_Stamina - 3, pSkill->weeks);
|
CuAssertIntEquals(tc, initialWeeks_Stamina - 3, pSkill->weeks);
|
||||||
|
|
||||||
pSkill = unit_skill(u, SK_MAGIC);
|
pSkill = unit_skill(u, SK_MAGIC);
|
||||||
CuAssertIntEquals(tc, initialWeeks_Magic - 3, pSkill->weeks);
|
CuAssertIntEquals(tc, initialWeeks_Magic - 3, pSkill->weeks);
|
||||||
|
|
||||||
test_cleanup();
|
test_cleanup();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue