From 1e19c5921aaa3b2480bbcd972f5b6507f66a9c92 Mon Sep 17 00:00:00 2001 From: Estellar <137097857+estellarc@users.noreply.github.com> Date: Tue, 13 Jan 2026 13:34:01 -0300 Subject: [PATCH] Only test if move name fits on the bag screen for moves names within a TM/HM (#8882) Co-authored-by: FosterProgramming --- test/text.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/text.c b/test/text.c index 05e9ca1ffd..ed458954e6 100644 --- a/test/text.c +++ b/test/text.c @@ -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); }