HLE: expand synthetic unit tests for apu.rs (1 -> 19 tests) #1137
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1137"
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 Marvisak/VIctory. Originally posted by Vittorio17 on 2026-11-24T16:07:16Z.
Summary
Audits
crates/victory-hle/src/modules/apu.rsand expands its deterministic synthetic unit tests from 1 to 19 passing tests. Packets are synthetic two-tone Opus streams encoded at test time viaopus_pure, so there are no fixtures and no game data. Production code is unchanged.Closes #1120.
Tests added
ALREADY_ACTIVEon a second activation, mono and stereo streams.first_frameand output-room clamping, planarDEINTERLEAVED_OUTPUT, mono output and stereo-to-mono downmix.BAD_PACKETleaving the title buffer untouched.RESETrestores initial decoder state; one result per command in order; per-streamQUEUE_FULLand slot release on dequeue; rejected commands leave no result behind.PENDING_RESULTS, null arguments on every export, andSIGNAL/auto-reset event behaviour.Verification (Windows 11 x64 MSVC, Rust 1.98.1)
rustfmt --edition 2024 --check crates/victory-hle/src/modules/apu.rs: PASScargo xtask policy: PASS (154 files ok)cargo clippy -p victory-hle --all-targets --locked -- -D warnings: PASS (0 warnings)cargo clippy -p victory-hle --all-targets --locked --features diagnostics -- -D warnings: PASS (0 warnings)cargo test -p victory-hle --locked -- "modules::apu::tests": 19 passed, 0 failedCherry-picked from
geiyiliyabumo/VIctory@d10138b(branchtest/hle-apu-audit), as suggested in the issue.Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:01:26Z.
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
7d94b72:cargo test -p victory-hlepasses, 113 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:32:51Z.
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #1212.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed