test(victory-gpu): pin native::list pure helpers (decode_signed, dxil_bitcode, dedup_stage_elems) #618
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/618"
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-28T15:18:34Z.
Test-only change: the pure helpers in
crates/victory-gpu/src/native/list.rshad no unit tests. 91 lines appended (#[cfg(test)] mod testsat the end of the file); no production code touched.What the tests pin
decode_signed: zigzag decode — even raw maps toraw >> 1, odd raw to-((raw >> 1)), plus a round trip over0, ±1, ±42, i64::MAX, i64::MIN + 1.dxil_bitcode: a hand-built minimal DXBC container with one DXIL part whose bitcode starts with theBC C0 DEmagic is parsed and returns the bitcode past the magic; rejects empty/short containers, a badDXBCmagic, a part count past EOF, a part without theDXILtag, and bitcode without theBC C0 DEmagic.dedup_stage_elems: keeps exactly one element per key —Tableby(slot, offset),PairsandFixedby kind/index — and because the sort key ends in!writes, thewrites: truevariant sorts first and is the one kept.How it was tested
cargo test --target x86_64-apple-darwin -p victory-gpu --lib native::list::tests— 4 pass (thenativemodule is x86_64-only, so this runs under Rosetta)cargo test --target x86_64-apple-darwin -p victory-gpu -- --test-threads=4— 453 pass, 0 fail. At the default thread count a few pre-existing Metal GPU tests innative/tests.rsflake on this M1 under Rosetta; the same failures reproduce on a cleanupstream/maincheckout (issue #548 territory), and each failing test passes in isolation.cargo test -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— cleanChecklist
vibe/list-helpers-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.