diff --git a/test/ability_dry_skin.c b/test/ability_dry_skin.c index 6c28d0c42..855872d76 100644 --- a/test/ability_dry_skin.c +++ b/test/ability_dry_skin.c @@ -33,10 +33,13 @@ SINGLE_BATTLE_TEST("Dry Skin heals 1/8th Max HP in Rain") SINGLE_BATTLE_TEST("Dry Skin increases damage taken from Fire-type moves by 25%", s16 damage) { + u32 ability; + PARAMETRIZE { ability = ABILITY_EFFECT_SPORE; } + PARAMETRIZE { ability = ABILITY_DRY_SKIN; } GIVEN { ASSUME(gBattleMoves[MOVE_EMBER].type == TYPE_FIRE); PLAYER(SPECIES_WOBBUFFET); - OPPONENT(SPECIES_PARASECT) { Ability(ABILITY_DRY_SKIN); }; + OPPONENT(SPECIES_PARASECT) { Ability(ability); }; } WHEN { TURN {MOVE(player, MOVE_EMBER); } } SCENE { diff --git a/test/ability_volt_absorb.c b/test/ability_volt_absorb.c index 8a3c21ef6..6b9296268 100644 --- a/test/ability_volt_absorb.c +++ b/test/ability_volt_absorb.c @@ -63,8 +63,9 @@ SINGLE_BATTLE_TEST("Volt Absorb is only triggered once on multi strike moves") } } -DOUBLE_BATTLE_TEST("Volt Absorb does not stop Electric Typed Explosion from damaging other pokemon", s16 damage1, s16 damage2) // Fixed issue #1961 +DOUBLE_BATTLE_TEST("Volt Absorb does not stop Electric Typed Explosion from damaging other pokemon") // Fixed issue #1961 { + s16 damage1, damage2; GIVEN { ASSUME(gBattleMoves[MOVE_EXPLOSION].effect == EFFECT_EXPLOSION); ASSUME(gBattleMoves[MOVE_EXPLOSION].type == TYPE_NORMAL); @@ -78,11 +79,11 @@ DOUBLE_BATTLE_TEST("Volt Absorb does not stop Electric Typed Explosion from dama ABILITY_POPUP(playerLeft, ABILITY_VOLT_ABSORB); HP_BAR(playerLeft, hp: TEST_MAX_HP / 4 + 1); MESSAGE("Jolteon restored HP using its Volt Absorb!"); - HP_BAR(playerRight, captureDamage: &results->damage1); - HP_BAR(opponentRight, captureDamage: &results->damage2); + HP_BAR(playerRight, captureDamage: &damage1); + HP_BAR(opponentRight, captureDamage: &damage2); } THEN { - EXPECT_NE(results[0].damage1, 0); - EXPECT_NE(results[0].damage2, 0); + EXPECT_NE(damage1, 0); + EXPECT_NE(damage2, 0); } } diff --git a/test/hold_effect_mirror_herb.c b/test/hold_effect_mirror_herb.c index fc0a6de95..22f564b85 100644 --- a/test/hold_effect_mirror_herb.c +++ b/test/hold_effect_mirror_herb.c @@ -9,8 +9,8 @@ ASSUMPTIONS SINGLE_BATTLE_TEST("Mirror Herb copies all of foe's stat changes in a turn", s16 damage) { u32 item; - PARAMETRIZE{ item = ITEM_NONE; } - PARAMETRIZE{ item = ITEM_MIRROR_HERB; } + PARAMETRIZE { item = ITEM_NONE; } + PARAMETRIZE { item = ITEM_MIRROR_HERB; } GIVEN { PLAYER(SPECIES_WOBBUFFET) { Speed(4); } OPPONENT(SPECIES_WOBBUFFET) { Speed(5); Item(item); } @@ -34,7 +34,7 @@ SINGLE_BATTLE_TEST("Mirror Herb copies all of foe's stat changes in a turn", s16 } } -SINGLE_BATTLE_TEST("Mirror Herb copies all of of Stuff Cheeks", s16 damage) +SINGLE_BATTLE_TEST("Mirror Herb copies all of of Stuff Cheeks") { GIVEN { ASSUME(gItems[ITEM_LIECHI_BERRY].holdEffect == HOLD_EFFECT_ATTACK_UP); diff --git a/test/item_effect_increase_stat.c b/test/item_effect_increase_stat.c index bbaf20e2f..310932040 100644 --- a/test/item_effect_increase_stat.c +++ b/test/item_effect_increase_stat.c @@ -126,7 +126,7 @@ SINGLE_BATTLE_TEST("X Speed sharply raises battler's Speed stat", s16 damage) } } -SINGLE_BATTLE_TEST("X Accuracy sharply raises battler's Accuracy stat", s16 damage) +SINGLE_BATTLE_TEST("X Accuracy sharply raises battler's Accuracy stat") { ASSUME(gBattleMoves[MOVE_SING].accuracy == 55); diff --git a/test/terrain_psychic.c b/test/terrain_psychic.c index f7e3a2af7..f9f95a47d 100644 --- a/test/terrain_psychic.c +++ b/test/terrain_psychic.c @@ -61,7 +61,7 @@ SINGLE_BATTLE_TEST("Psychic Terrain increases power of Psychic-type moves by 30/ } } -SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target the user", s16 damage) +SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target the user") { GIVEN { PLAYER(SPECIES_SABLEYE) { Ability(ABILITY_PRANKSTER); HP(1); } @@ -76,7 +76,7 @@ SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target the } } -SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all battlers", s16 damage) +SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all battlers") { KNOWN_FAILING; GIVEN { @@ -91,7 +91,7 @@ SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all } } -SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all opponents", s16 damage) +SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all opponents") { KNOWN_FAILING; GIVEN { @@ -106,7 +106,7 @@ SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all } } -DOUBLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target allies", s16 damage) +DOUBLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target allies") { GIVEN { PLAYER(SPECIES_SABLEYE) { Ability(ABILITY_PRANKSTER); } @@ -122,7 +122,7 @@ DOUBLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all } } -SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority field moves", s16 damage) +SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority field moves") { KNOWN_FAILING; GIVEN { diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index c1ea34e8c..cfe5db9d6 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -134,6 +134,8 @@ static void BattleTest_SetUp(void *data) Test_ExitWithResult(TEST_RESULT_ERROR, "OOM: STATE = AllocZerod(%d)", sizeof(*STATE)); InvokeTestFunction(test); STATE->parameters = STATE->parametersCount; + if (STATE->parametersCount == 0 && test->resultsSize > 0) + Test_ExitWithResult(TEST_RESULT_INVALID, "results without PARAMETRIZE"); STATE->results = AllocZeroed(test->resultsSize * STATE->parameters); if (!STATE->results) Test_ExitWithResult(TEST_RESULT_ERROR, "OOM: STATE->results = AllocZerod(%d)", sizeof(test->resultsSize * STATE->parameters));