mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-25 16:13:54 -07:00
Add test coverage for setActive change-detection behavior
This commit is contained in:
parent
156b4631cd
commit
4a4c767cae
1 changed files with 10 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue