Formats: add 7 invariant unit tests for xma/tables.rs #1205
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1205
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1205/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@geiyiliyabumo on GitHub · 2026-11-24 16:25 UTC · original
geiyiliyabumo:test/formats-xma-tables→main· +259 −0 · 1 files · 1 commits · merged 2026-11-25 21:50 UTCSummary
Closes #1075
Full verification details and change notes are documented in #1075 (commit
d3867e6, based onmainffe310e).Verification (Windows 11 x64 MSVC)
rustfmt --edition 2024 --checkon edited files: PASScargo xtask policy: PASS (zero game files/data)cargo clippy --all-targets --locked -- -D warnings(default +--features diagnosticswhere applicable): PASSAI-assisted; synthetic tests only, no game files.
@Zipettte on GitHub · 2026-11-24 18:00 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
d3867e6:cargo test -p victory-formatspasses, 30 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@Marvisak on GitHub · 2026-11-25 01:19 UTC · original
Automated triage for the maintainers.
Merge candidate.
This adds a test module to
crates/victory-formats/src/xma/tables.rsand adds#[rustfmt::skip]to the table literals. No table values change. The useful checks:Vlcthatcodes()builds is a complete prefix code: the code lengths tile the 32-bit space exactly. Without this, a mistyped length would leave words that decode to the wrong symbol throughVlc::read'spartition_point(..) - 1.codes()are covered.CRITICAL_FREQhasMAX_BANDS - 1strictly ascending edges.The private items the tests use (
Bits,Vlc,codes,consumed,FRAME_SAMPLES,MAX_BANDS) all exist inxma.rs. The "canonical" assertion holds by construction inVlc::new, but the completeness and permutation checks protect the data.CI: not run on this head. The PR reports
cargo test -p victory-formatspassing on Windows.Generated by Claude Code