mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #2034] runtime: add unit test suite for console identity and registry ConsoleMode mapping (RT-CONSOLE-IDENTITY-COVERAGE) #2040
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2040
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2034
Author: @abnalstlll-byte
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:feat/rt-console-identity-coverage📝 Commits (1)
ba4d61eruntime: add unit test suite for console identity and registry ConsoleMode mapping (RT-CONSOLE-IDENTITY-COVERAGE)📊 Changes
2 files changed (+212 additions, -0 deletions)
View changed files
📝
runtime/CMakeLists.txt(+12 -0)➕
runtime/test/console_identity_test.cpp(+200 -0)📄 Description
Claimed in the coordination issue as: RT-CONSOLE-IDENTITY-COVERAGE (claim)
What and why
runtime/shims/console_identity.his the single source of truth for console device type (configured_device_type()) and OEM registryConsoleModemapping (console_mode_for()), ensuringXSystemGetDeviceTypeand registry queriesHKLM\Software\Microsoft\Windows NT\CurrentVersion\OEM\ConsoleModenever disagree.Previously,
console_identity.hlacked a dedicated standalone unit test exercising all device type enums and environment variable boundary conditions.This adds
runtime/test/console_identity_test.cppverifying:console_mode_for:trueand correct DWORD values for Xbox Series consoles: Lockhart (0x60), Anaconda (0x64), Devkit (0x68).falsefor non-console / Xbox One types (Unknown, Pc, XboxOne, XboxOneS, XboxOneX, XboxOneXDevkit) and out-of-range values, leaving them to the host registry.configured_device_type:XboxScarlettAnaconda, 7) whenLEONIDA_DEVICE_TYPEis unset, empty, or outside 0..8.configured_device_type()andconsole_mode_for().Registers
console_identity_testand CTestconsole_identityinruntime/CMakeLists.txt.Tested
41/41 checks passed(0 failures).python -I tests/test_ci_registration.py: 16/16 pass.python -I tests/test_text_write_line_endings.py: 3/3 pass.python -I scripts/check_no_game_data.py: clean (0 violations, no game data).AI-assisted (Claude Code)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.