Add test coverage for setActive change-detection behavior

This commit is contained in:
DawnFire42 2026-06-15 11:26:04 -04:00
parent 156b4631cd
commit 4a4c767cae
No known key found for this signature in database
GPG key ID: 24BB855EE2911B33

View file

@ -111,6 +111,16 @@ TEST(ServerCounter, CustomBoundsForCommanderTax)
EXPECT_EQ(taxCounter.getCount(), 0);
}
TEST(ServerCounter, SetActiveReportsChangeOnce)
{
Server_Counter c(1, "test", color(), 10, 0);
EXPECT_TRUE(c.isActive());
EXPECT_TRUE(c.setActive(false));
EXPECT_FALSE(c.isActive());
EXPECT_FALSE(c.setActive(false));
EXPECT_TRUE(c.setActive(true));
}
int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);