Expand pure-Rust unit test coverage for switch parsing, A/B helpers and launcher profiles #14
Labels
No labels
accessibility
area: compatibility
area: docs
area: hygiene
area: infra
area: memory
area: ray-tracing
area: rendering
area: shaders
area: submission
area: textures
bug
ci
dependencies
difficulty: advanced systems
difficulty: intermediate
documentation
duplicate
enhancement
experimental
good first issue
help wanted
invalid
known issue
performance
priority: P0
priority: P1
priority: P2
proposal
question
rendering
research
testing
triage
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/VictoryX-dev--VictoryX#14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@VictoryX-dev on GitHub · 2026-12-03 02:57 UTC · original
Problem
Several pure-logic modules in
victory-gpuandlauncherhandle user configuration, A/B phase scheduling, frame-metric percentile math and GPU/CPU profile selection. Expanding their unit test coverage protects contributors against silent regressions without requiring any title data or physical GPU hardware.Known Evidence
runtime/crates/victory-gpu/src/switch.rsparses booleanVICTORY_*values ("0"vs non-zero).runtime/crates/victory-gpu/src/ab.rsparsesVICTORY_AB=<seconds>,<SW1>[,...]and keeps a hand-maintained alphabeticalREADtable (where typos or out-of-order entries can silently break A/B runs).runtime/crates/victory-gpu/src/frame_metrics.rscomputes nearest-rank percentiles (p50,p95,p99,p99_9),low_1pct_fps/low_0_1pct_fpsand tail-frame cost attribution.launcher/src/hw.rsandlauncher/src/profile.rsclassify AMD/NVIDIA/Intel GPU generations, VRAM tiers and console profiles from plain structs.cargo test.Approaches That Did Not Work
frame_metrics::testsalready does). Always test pure parsing functions directly wherever possible.Relevant Source Modules
runtime/crates/victory-gpu/src/switch.rsruntime/crates/victory-gpu/src/ab.rsruntime/crates/victory-gpu/src/frame_metrics.rslauncher/src/hw.rslauncher/src/profile.rsExpected Contribution
ab.rs: verifyingREADis strictly sorted alphabetically, rejects >8 switches, rejectsseconds <= 1.0, handles whitespace/trailing commas and validates bitmask phase wrap-around.frame_metrics.rs: boundary cases forMetrics::of(100% uniform frames, single extreme spike, exact 1% and 0.1% boundary counts).launcher/src/hw.rs&profile.rs: additional synthetic GPU/CPU hardware profiles (e.g., Intel Arc Battlemage/Alchemist, AMD RDNA 2/3/4, NVIDIA Ada/Blackwell, 8 GB / 12 GB / 16 GB / 24 GB VRAM tiers and hybrid P/E-core CPUs).Acceptance Criteria
cargo test --workspace --locked(inruntime/) andcargo test(inlauncher/) pass cleanly.cargo clippypasses with-D warnings.