Only test if move name fits on the bag screen for moves names within a TM/HM (#8882)

Co-authored-by: FosterProgramming <jamiefosterandco@gmail.com>
This commit is contained in:
Estellar 2026-01-13 13:34:01 -03:00 committed by GitHub
parent 9798b6c7d7
commit 1e19c5921a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,6 +6,7 @@
#include "battle_setup.h"
#include "item.h"
#include "malloc.h"
#include "party_menu.h"
#include "main_menu.h"
#include "string_util.h"
#include "text.h"
@ -66,12 +67,13 @@ TEST("Move names fit on Contest Screen")
TEST("Move names fit on TMs & HMs Bag Screen")
{
u32 i;
const u32 fontId = FONT_NARROWER, widthPx = 61;
u32 move = MOVE_NONE;
for (i = 1; i < MOVES_COUNT; i++)
for (enum TMHMIndex tm = 1; tm <= NUM_ALL_MACHINES; tm++)
{
PARAMETRIZE_LABEL("%S", GetMoveName(i)) { move = i; }
u32 tmMove = GetTMHMMoveId(tm);
PARAMETRIZE_LABEL("%S", GetMoveName(tmMove)) { move = tmMove; }
}
EXPECT_LE(GetStringWidth(fontId, GetMoveName(move), 0), widthPx);
}