sovereignx/test/battle/move_effect/power_split.c
Alex 8607a7fb33
Fixes UB in Cmd_averagestats (#5191)
* Fixes UB in Cmd_averagestats

* fix test and align default case
2024-08-17 18:19:22 +02:00

22 lines
568 B
C

#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
ASSUME(gMovesInfo[MOVE_POWER_SPLIT].effect == EFFECT_POWER_SPLIT);
}
SINGLE_BATTLE_TEST("Power Split averages user and targets Atk and Sp. Atk stats")
{
GIVEN {
PLAYER(SPECIES_BULBASAUR);
OPPONENT(SPECIES_IVYSAUR);
} WHEN {
TURN { MOVE(player, MOVE_POWER_SPLIT); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_POWER_SPLIT, player);
} THEN {
EXPECT_EQ(player->attack, opponent->attack);
EXPECT_EQ(player->spAttack, opponent->spAttack);
}
}