Skip to content

Commit

Permalink
PARAMETRIZE_LABEL in test/species.c
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgriffin committed Mar 5, 2024
1 parent 72bdaf1 commit 1e4540d
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions test/species.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ TEST("Form species ID tables are shared between all forms")
{
u32 i;
u32 species = SPECIES_NONE;
const u16 *formSpeciesIdTable;
for (i = 0; i < NUM_SPECIES; i++)
{
if (gSpeciesInfo[i].formSpeciesIdTable) PARAMETRIZE { species = i; }
if (gSpeciesInfo[i].formSpeciesIdTable)
{
PARAMETRIZE_LABEL("%S", gSpeciesInfo[i].speciesName) { species = i; }
}
}

const u16 *formSpeciesIdTable = gSpeciesInfo[species].formSpeciesIdTable;
formSpeciesIdTable = gSpeciesInfo[species].formSpeciesIdTable;
for (i = 0; formSpeciesIdTable[i] != FORM_SPECIES_END; i++)
{
u32 formSpeciesId = formSpeciesIdTable[i];
Expand All @@ -23,13 +27,18 @@ TEST("Form change tables contain only forms in the form species ID table")
{
u32 i, j;
u32 species = SPECIES_NONE;
const struct FormChange *formChangeTable;
const u16 *formSpeciesIdTable;
for (i = 0; i < NUM_SPECIES; i++)
{
if (gSpeciesInfo[i].formChangeTable) PARAMETRIZE { species = i; }
if (gSpeciesInfo[i].formChangeTable)
{
PARAMETRIZE_LABEL("%S", gSpeciesInfo[i].speciesName) { species = i; }
}
}

const struct FormChange *formChangeTable = gSpeciesInfo[species].formChangeTable;
const u16 *formSpeciesIdTable = gSpeciesInfo[species].formSpeciesIdTable;
formChangeTable = gSpeciesInfo[species].formChangeTable;
formSpeciesIdTable = gSpeciesInfo[species].formSpeciesIdTable;
EXPECT(formSpeciesIdTable);

for (i = 0; formChangeTable[i].method != FORM_CHANGE_TERMINATOR; i++)
Expand All @@ -51,12 +60,16 @@ TEST("Form change targets have the appropriate species flags")
{
u32 i;
u32 species = SPECIES_NONE;
const struct FormChange *formChangeTable;
for (i = 0; i < NUM_SPECIES; i++)
{
if (gSpeciesInfo[i].formChangeTable) PARAMETRIZE { species = i; }
if (gSpeciesInfo[i].formChangeTable)
{
PARAMETRIZE_LABEL("%S", gSpeciesInfo[i].speciesName) { species = i; }
}
}

const struct FormChange *formChangeTable = gSpeciesInfo[species].formChangeTable;
formChangeTable = gSpeciesInfo[species].formChangeTable;
for (i = 0; formChangeTable[i].method != FORM_CHANGE_TERMINATOR; i++)
{
const struct SpeciesInfo *targetSpeciesInfo = &gSpeciesInfo[formChangeTable[i].targetSpecies];
Expand Down

0 comments on commit 1e4540d

Please sign in to comment.