Refactor: replace hardcoded unit array size 7 with nd::MAX_UNITS
- Replace hardcoded with in NetDeck.ino (8 occurrences) - Add to nd_layout.h - Update test expectations in unit_tests.h and integration_tests.h from units[6] to units[7] to match the new reinforcement slot indexing This enables supporting more than 7 units in the future.
This commit is contained in:
@@ -197,7 +197,7 @@ TEST(unit/reset_rearms_everything)
|
||||
EXPECT(units[0].alive && units[1].alive);
|
||||
EXPECT_EQ(units[0].tx, 2); // back in the airlock
|
||||
EXPECT_EQ(units[0].hp, STATS[U_MARINE].maxHp);
|
||||
EXPECT(!units[6].alive); // reinforcement slot cleared
|
||||
EXPECT(!units[7].alive); // reinforcement slot cleared
|
||||
EXPECT(!doorOpen);
|
||||
EXPECT_EQ(heatT, 0);
|
||||
EXPECT(linkIdx(0) < 0 && linkIdx(1) < 0 && linkIdx(2) < 0);
|
||||
|
||||
Reference in New Issue
Block a user