Skip to content

test: add test coverage for marker side value mapping#74

Merged
fank merged 1 commit intomainfrom
fix/marker-side-resistance-alias
Feb 3, 2026
Merged

test: add test coverage for marker side value mapping#74
fank merged 1 commit intomainfrom
fix/marker-side-resistance-alias

Conversation

@fank
Copy link
Member

@fank fank commented Feb 3, 2026

Summary

  • Add TestMarkerSideValues test to verify sideToIndex correctly maps side strings to numeric indices
  • Improve sideToIndex comment to document expected input format from SQF (str side returns EAST, WEST, GUER, CIV, EMPTY, LOGIC, UNKNOWN)
  • Document that non-combat sides (EMPTY, LOGIC, UNKNOWN) map to GLOBAL (-1)

Test plan

  • go test ./internal/storage/memory/... -run Side passes

Add TestMarkerSideValues to verify sideToIndex correctly maps
side strings (from "str side" SQF command) to numeric indices.

Also improve sideToIndex comment to document expected input format
and handling of non-combat sides (EMPTY, LOGIC, UNKNOWN).
@fank fank force-pushed the fix/marker-side-resistance-alias branch from 0a12847 to c048990 Compare February 3, 2026 18:39
@fank fank changed the title fix: add RESISTANCE as alias for GUER side in marker export test: add test coverage for marker side value mapping Feb 3, 2026
@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/OCAP2/extension/v5/internal/storage/memory 15.05% (+0.10%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/OCAP2/extension/v5/internal/storage/memory/export.go 13.52% (+0.19%) 1613 218 (+3) 1395 (-3) 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/OCAP2/extension/v5/internal/storage/memory/export_test.go

@fank fank merged commit 3d7b7ef into main Feb 3, 2026
3 checks passed
@fank fank deleted the fix/marker-side-resistance-alias branch February 3, 2026 18:40
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