From 60e048b83e967db723f2b6893555e14a44a8b0cb Mon Sep 17 00:00:00 2001 From: CallmeEchoo Date: Tue, 25 Apr 2023 13:44:16 +0200 Subject: [PATCH] more robust status cure tests --- test/item_effect_cure_status.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/test/item_effect_cure_status.c b/test/item_effect_cure_status.c index 229f4e2b7..4d4cbda2e 100644 --- a/test/item_effect_cure_status.c +++ b/test/item_effect_cure_status.c @@ -11,6 +11,8 @@ SINGLE_BATTLE_TEST("Cure Status: Paralyze Heal heals a battler from being paraly TURN { USE_ITEM(player, ITEM_PARALYZE_HEAL, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -24,6 +26,8 @@ SINGLE_BATTLE_TEST("Cure Status: Antidote heals a battler from being poisoned") TURN { USE_ITEM(player, ITEM_ANTIDOTE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -37,6 +41,8 @@ SINGLE_BATTLE_TEST("Cure Status: Antidote heals a battler from being badly poiso TURN { USE_ITEM(player, ITEM_ANTIDOTE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -50,6 +56,8 @@ SINGLE_BATTLE_TEST("Cure Status: Awakening heals a battler from being asleep") TURN { USE_ITEM(player, ITEM_AWAKENING, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -63,6 +71,8 @@ SINGLE_BATTLE_TEST("Cure Status: Burn Heal heals a battler from being burned") TURN { USE_ITEM(player, ITEM_BURN_HEAL, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -76,6 +86,8 @@ SINGLE_BATTLE_TEST("Cure Status: Ice Heal heals a battler from being paralyzed") TURN { USE_ITEM(player, ITEM_ICE_HEAL, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -96,6 +108,8 @@ SINGLE_BATTLE_TEST("Cure Status: Full Heal heals a battler from any primary stat TURN { USE_ITEM(player, ITEM_FULL_HEAL, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -116,6 +130,8 @@ SINGLE_BATTLE_TEST("Cure Status: Heal Powder heals a battler from any primary st TURN { USE_ITEM(player, ITEM_HEAL_POWDER, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -136,6 +152,8 @@ SINGLE_BATTLE_TEST("Cure Status: Pewter Crunchies heals a battler from any prima TURN { USE_ITEM(player, ITEM_PEWTER_CRUNCHIES, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -156,6 +174,8 @@ SINGLE_BATTLE_TEST("Cure Status: Lava Cookies heals a battler from any primary s TURN { USE_ITEM(player, ITEM_LAVA_COOKIE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -176,6 +196,8 @@ SINGLE_BATTLE_TEST("Cure Status: Rage Candy Bar heals a battler from any primary TURN { USE_ITEM(player, ITEM_RAGE_CANDY_BAR, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -196,6 +218,8 @@ SINGLE_BATTLE_TEST("Cure Status: Old Gateu heals a battler from any primary stat TURN { USE_ITEM(player, ITEM_OLD_GATEAU, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -216,6 +240,8 @@ SINGLE_BATTLE_TEST("Cure Status: Casteliacone heals a battler from any primary s TURN { USE_ITEM(player, ITEM_CASTELIACONE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -236,6 +262,8 @@ SINGLE_BATTLE_TEST("Cure Status: Lumiose Galette heals a battler from any primar TURN { USE_ITEM(player, ITEM_LUMIOSE_GALETTE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!");; + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -256,6 +284,8 @@ SINGLE_BATTLE_TEST("Cure Status: Shalour Sable heals a battler from any primary TURN { USE_ITEM(player, ITEM_SHALOUR_SABLE, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -276,6 +306,8 @@ SINGLE_BATTLE_TEST("Cure Status: Big Malasada heals a battler from any primary s TURN { USE_ITEM(player, ITEM_BIG_MALASADA, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status1, STATUS1_NONE); } } @@ -301,5 +333,7 @@ SINGLE_BATTLE_TEST("Cure Status: Full Heal and local specialties heal a battler TURN { USE_ITEM(player, item, partyIndex: 0); } } SCENE { MESSAGE("Wobbuffet had its status healed!"); + } FINALLY { + EXPECT_EQ(player->status2, STATUS1_NONE); // because we dont have STATUS2_NONE } }