Skip to content

Expand library test coverage to ~86% - #12

Merged
colemancda merged 7 commits into
mainfrom
test/expand-coverage
Jul 18, 2026
Merged

colemancda merged 7 commits into
mainfrom
test/expand-coverage

Conversation

@colemancda

Copy link
Copy Markdown
Owner

Summary

Continues the library coverage work merged in #11, pushing overall library coverage to ~86% (from ~84% at the merge point). All CI jobs green; the suite stays deterministic.

  • Server handler surface: drives a connected client through room detail, capacity/stage/option/item/title changes, tank/team select, ready, user lookup, avatar get/set/buy (gold+cash), sell, gift, and kick — the handlers the create/join/chat flows don't reach.
  • Battle modes: runs Score/Tag/Jewel battles through InBattleScreen to resolution (distinct secondary tanks so Tag can swap), covering the mode-specific simulation and render paths.
  • Dialog & panel widgets: constructs DialogWidget, CreateRoomDialogWidget, BuddyChatWindowWidget, AddBuddyDialogWidget, BuddyPanelWidget with fake textures and drives draw + a spread of clicks/text/keys/drags.
  • AssetLibrary failure paths: every loader surfaces a missing-archive error and localizedString degrades to nil.
  • De-flaked the view-model networking push tests: they now drive the network send (covering the Task body) and apply the resulting push directly, covering applyBuddyList/appendChat deterministically — the real round-trip stays exercised by the loopback suite. Also bumps connect retries and the wait window for CI margin.
  • Ratchets the coverage gate 83 → 85%.

Coverage

Library Coverage
GunBoundFile 98.9%
GunBoundProtocol 95.7%
GunBound 83.1%
GunBoundClient 79.0%
Overall (libs) ~86%

Test plan

  • swift test — 554 tests, green across repeated local runs (~14s)
  • CI green on this PR

Drives a connected client through room detail, capacity/stage/option/
item/title changes, tank/team select, ready, user lookup, avatar
get/set/buy(gold+cash), sell, gift, and kick — the handlers the
create/join/chat flows don't reach.
Runs a battle in each game mode (distinct secondary tanks so Tag can
swap) through firing and a death, rendering every frame — covering
the mode-specific simulation and render paths.
Constructs DialogWidget, CreateRoomDialogWidget, BuddyChatWindowWidget,
AddBuddyDialogWidget, and BuddyPanelWidget with fake textures and drives
draw plus a spread of clicks, text, keys, and drags over their frames.
With no archives on disk, every loader surfaces a missing-archive
error and localizedString degrades to nil.
The buddy/chat tests depended on a real push round-trip through
onEnter's concurrent request fan-out, which intermittently starved a
handshake on CI (timeout(nonceResponse)). They now drive the network
send (covering the Task body) and apply the resulting push directly,
covering applyBuddyList/appendChat deterministically — the real
round-trip is still exercised by the loopback suite. Also bumps
connect retries (4->10) and the wait window for extra CI margin.
@colemancda
colemancda merged commit a9eeff2 into main Jul 18, 2026
5 checks passed
@colemancda
colemancda deleted the test/expand-coverage branch July 18, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant