test(victory-formats): pin the XMA Pro Huffman/level tables' invariants #611
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/611"
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?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T13:21:45Z.
Test-only change:
crates/victory-formats/src/xma/tables.rsheld 16 constant tables (Huffman pairs, code lengths, run/level tables) with no tests.What the tests pin
SCALE,SCALE_RL,COEF1,VEC2,VEC1, plusCOEF0_SYMS/COEF0_LENSandVEC4_SYMS/VEC4_LENSzipped the wayxma.rsconsumes them — is a complete prefix code: walking the entries in code order with the same assignmentxma::Vlc::newmakes (code += 1 << (32 - len)) keeps every code in 32 bits, ends exactly at1 << 32, has unique symbols and lengths in 1..=32.CRITICAL_FREQis strictly increasing.Testing
cargo test -p victory-formats --lib xma::tables— 3 passcargo test -p victory-formats -p victory-hle -p victory -p victory-gpu -p xtask(host arm64) — all passcargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings— cleancargo xtask policy— 404 files okChecklist
vibe/xma-tables-tests-1705acfromupstream/main, pushed to my fork onlyView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.