Add unit tests for console.rs #631

Closed
github-bot wants to merge 1 commit from gh-pr/631/head into gh-pr/631/base
Owner

@⁠shayanCSknu on GitHub · 2026-11-24 05:57 UTC · original
shayanCSknu:patch-1 → main · +27 −0 · 1 files · 1 commits · closed without merging

crates/victory-gpu/src/console.rs had no tests. This adds three:

  • Series X is the default console
  • title_memory() matches the published figures (Series X: 10 GiB + 3.5 GiB; Series S: 7,776 MiB)
  • name() returns the right console names

set()/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 clippy is clean, cargo xtask policy passes.

Written with help from Claude (AI).

**@⁠shayanCSknu** on GitHub · 2026-11-24 05:57 UTC · [original](https://github.com/Marvisak/VIctory/pull/631) `shayanCSknu:patch-1` → `main` · +27 −0 · 1 files · 1 commits · closed without merging `crates/victory-gpu/src/console.rs` had no tests. This adds three: - Series X is the default console - `title_memory()` matches the published figures (Series X: 10 GiB + 3.5 GiB; Series S: 7,776 MiB) - `name()` returns the right console names `set()`/`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 clippy` is clean, `cargo xtask policy` passes. Written with help from Claude (AI).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:10:42 +00:00
github-bot closed this pull request 2026-11-26 04:10:42 +00:00
Author
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 12:23 UTC · original

Independent verification & code review on Windows 11 x64 MSVC (merged onto main ffe310e):

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/3 tests)

Review

Looks clean and ready to merge — all three unit tests verify Console::default(), title_memory(), and name() accurately without mutating the process-wide set()/current() state, keeping parallel crate tests isolated.

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 12:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/631#issuecomment-7131381139) Independent verification & code review on Windows 11 x64 MSVC (merged onto `main` `ffe310e`): ### 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/3` tests) ### Review Looks clean and ready to merge — all three unit tests verify `Console::default()`, `title_memory()`, and `name()` accurately without mutating the process-wide `set()`/`current()` state, keeping parallel crate tests isolated. *AI-assisted; synthetic tests only, no game files.*
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:26 UTC · original

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.

**@⁠Marvisak** on GitHub · 2026-11-25 00:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/631#issuecomment-7148513236) 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

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!631
No description provided.