MCPcopy Create free account
hub / github.com/EasyRPG/Player / testIrregularSkill

Function testIrregularSkill

tests/enemyai.cpp:36–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34TEST_SUITE_BEGIN("EnemyAi");
35
36static void testIrregularSkill(bool expect, int type, const Game_Battler& target, bool bugs) {
37 REQUIRE_EQ(expect, EnemyAi::IsSkillEffectiveOn(*MakeSkill(1, type, lcf::rpg::Skill::Scope_enemy), target, bugs));
38 REQUIRE_EQ(expect, EnemyAi::IsSkillEffectiveOn(*MakeSkill(1, type, lcf::rpg::Skill::Scope_enemies), target, bugs));
39 REQUIRE_EQ(expect, EnemyAi::IsSkillEffectiveOn(*MakeSkill(1, type, lcf::rpg::Skill::Scope_self), target, bugs));
40 REQUIRE_EQ(expect, EnemyAi::IsSkillEffectiveOn(*MakeSkill(1, type, lcf::rpg::Skill::Scope_ally), target, bugs));
41 REQUIRE_EQ(expect, EnemyAi::IsSkillEffectiveOn(*MakeSkill(1, type, lcf::rpg::Skill::Scope_party), target, bugs));
42}
43
44static void testNormalSkill(bool expect_enemy, bool expect_ally, lcf::rpg::Skill& skill, const Game_Battler& target, bool bugs) {
45 CAPTURE(bugs);

Callers 1

enemyai.cppFile · 0.85

Calls 2

IsSkillEffectiveOnFunction · 0.85
MakeSkillFunction · 0.85

Tested by

no test coverage detected