forked from github/server
repair the test for academies, make academy bonus use non-deprecated learn_skill
This commit is contained in:
parent
87b09cd3c6
commit
f55168e7de
|
@ -27,8 +27,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
void academy_teaching_bonus(struct unit *u, skill_t sk, int academy) {
|
||||
if (academy && sk != NOSKILL) {
|
||||
academy = academy / 30; /* anzahl gelehrter wochen, max. 10 */
|
||||
learn_skill_depr(u, sk, academy / 30.0 / TEACHNUMBER);
|
||||
learn_skill(u, sk, academy / STUDYDAYS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -230,14 +230,12 @@ static void test_academy_building(CuTest *tc) {
|
|||
teach_cmd(u, u->thisorder);
|
||||
learn_reset();
|
||||
CuAssertPtrNotNull(tc, msg = test_find_messagetype(u->faction->msgs, "teach_asgood"));
|
||||
// FIXME: new injection function
|
||||
#if 0
|
||||
CuAssertPtrEquals(tc, u, (unit *)(msg)->parameters[0].v);
|
||||
CuAssertPtrEquals(tc, u2, (unit *)(msg)->parameters[3].v);
|
||||
|
||||
CuAssertPtrEquals(tc, u, log_learners[0].u);
|
||||
CuAssertIntEquals(tc, SK_CROSSBOW, log_learners[0].sk);
|
||||
CuAssertIntEquals(tc, 10, log_learners[0].days);
|
||||
#endif
|
||||
CuAssertIntEquals(tc, 15, log_learners[0].days);
|
||||
test_cleanup();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue