Add test case to pin tax counter ID boundary

This commit is contained in:
DawnFire42 2026-07-09 14:16:55 -04:00
parent e84d2fb3a1
commit e447542957
No known key found for this signature in database
GPG key ID: 24BB855EE2911B33

View file

@ -49,6 +49,14 @@ TEST(NewCounterId, SkipsReservedRangeWhenOnlyReservedCountersExist)
EXPECT_EQ(f.player.newCounterId(), CounterIds::FirstUserId);
}
TEST(NewCounterId, SkipsTaxCounterIds)
{
PlayerFixture f;
f.player.addCounter(new Server_Counter(CounterIds::CommanderTax, "tax1", color(), 0, 0));
f.player.addCounter(new Server_Counter(CounterIds::PartnerTax, "tax2", color(), 0, 0));
EXPECT_EQ(f.player.newCounterId(), CounterIds::FirstUserId);
}
TEST(NewCounterId, ReturnsNextIdAboveHighestUserCounter)
{
PlayerFixture f;