Cockatrice/tests
DawnFire42 8dca14933c
Centralize counter API with server-side bounds and no-op filtering (#6879)
* Refactor server counter API to own overflow protection and filter no-op events

  Counter modifications now clamp to int bounds server-side and return change
  status, allowing command handlers to skip network broadcasts when values
  don't actually change.

* Centralize MAX_COUNTERS_ON_CARD and enforce [0, 999] bounds on server

  - Move MAX_COUNTERS_ON_CARD to trice_limits.h
  - Server clamps values in setCounter() and incrementCounter()
  - Client uses clamped comparison to allow recovery from invalid states
  - Add tests for clamping behavior

* move incrementCount() implementation from header to cpp
2026-05-21 20:39:35 -07:00
..
card_zone_algorithms [Game/Zones] Simple move refactor to differentiate between logic and graphics for zones (#6903) 2026-05-18 06:36:18 +02:00
carddatabase Fix/cmake test only build (#6709) 2026-03-15 17:24:50 +01:00
loading_from_clipboard Fix/cmake test only build (#6709) 2026-03-15 17:24:50 +01:00
movecard_tests Fix #6659: Correct logging for bottom-of-library card moves (#6764) 2026-04-21 19:05:31 +02:00
oracle Fix/cmake test only build (#6709) 2026-03-15 17:24:50 +01:00
CMakeLists.txt Centralize counter API with server-side bounds and no-op filtering (#6879) 2026-05-21 20:39:35 -07:00
deck_hash_performance_test.cpp Hashing tests (#5026) 2025-12-23 17:48:10 +01:00
dummy_test.cpp Clang script (#3085) 2018-02-06 08:45:13 -05:00
expression_test.cpp Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
password_hash_test.cpp Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
server_card_counter_test.cpp Centralize counter API with server-side bounds and no-op filtering (#6879) 2026-05-21 20:39:35 -07:00
server_counter_test.cpp Centralize counter API with server-side bounds and no-op filtering (#6879) 2026-05-21 20:39:35 -07:00
test_age_formatting.cpp [Move refactor] Reparent orphan classes (#6236) 2025-10-09 14:15:19 +02:00