Add unit tests for console.rs #631
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/631"
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 shayanCSknu on 2026-11-24T05:57:01Z.
crates/victory-gpu/src/console.rshad no tests. This adds three:title_memory()matches the published figures (Series X: 10 GiB + 3.5 GiB; Series S: 7,776 MiB)name()returns the right console namesset()/current()are not tested on purpose: they change a process-wide setting that other tests in the crate read, and tests run in parallel.Checked locally:
cargo test -p victory-gpu console::passes,cargo clippyis clean,cargo xtask policypasses.Written with help from Claude (AI).
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T08:08:20Z.
Review: APPROVED
Tested
e009e13on Windows 11, RTX 5070, MSVC:cargo test --workspace --no-fail-fastpasses (267 passed, 0 failed).These are test-only additions. They pin the documented memory split (Series X 10 GiB + 3.5 GiB, Series S 7,776 MiB), the default console and the names. Leaving
set/currentuntested is the right call, since they are process-global and the crate's tests run in parallel.No issues found.
AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T12:23:52Z.
Independent verification & code review on Windows 11 x64 MSVC (merged onto
mainffe310e):Checks Run
cargo xtask policy: PASS (154 files ok)cargo clippy -p victory-gpu --all-targets --locked -- -D warnings(default +--features diagnostics): PASS (0 warnings)cargo test -p victory-gpu --locked -- console::: PASS (3/3tests)Review
Looks clean and ready to merge — all three unit tests verify
Console::default(),title_memory(), andname()accurately without mutating the process-wideset()/current()state, keeping parallel crate tests isolated.AI-assisted; synthetic tests only, no game files.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T13:48:45Z.
Review: APPROVED
Tested merged cleanly onto
main(ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC, NVIDIA RTX 5090):cargo test -p victory-gpu: 53 passed, 0 failed, 1 ignored (including all 3 newconsole::tests::*unit tests)cargo clippy -p victory-gpu --all-targets: 0 warningscargo xtask policy: okClean, focused unit test coverage for
Consoledefaults, memory budgets, and display names. Approving.AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:26:31Z.
Automated triage for the maintainers. Closing because it does not change behaviour the project needs (formatting, guards for cases that cannot occur, or notes and translations that cannot be kept current).
Three tests that restate console.rs's constants (default, memory split, names) back to themselves; no behaviour is covered and the Series S figure is marked as a shortcut to be changed.
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