From 4a4c767cae194c9398ad5c2b12641276e1a3dc1b Mon Sep 17 00:00:00 2001 From: DawnFire42 Date: Mon, 15 Jun 2026 11:26:04 -0400 Subject: [PATCH] Add test coverage for setActive change-detection behavior --- tests/server_counter_test.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/server_counter_test.cpp b/tests/server_counter_test.cpp index 1f3c20154..aa0f82104 100644 --- a/tests/server_counter_test.cpp +++ b/tests/server_counter_test.cpp @@ -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);