WIP: test: unit tests for tools/rdna2_isa_tables.py #294

Closed
leonida/mandy
Andretuta wants to merge 0 commits from old-pr/10026 into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

Andretuta commented 2026-11-24 03:02:02 +00:00

Carried over from old PR 10026 by Ritolino in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/10026, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
Ritolino: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Claimed in the coordination issue as: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116995348

What and why

Adds standalone stdlib-only unit tests (tests/test_rdna2_isa_tables.py) for tools/rdna2_isa_tables.py and its cross-checks against tools/rdna2_decode.py.

  • Verifies structural integrity of all expected RDNA2 opcode/operand tables, VOP3 vs VOP3B disjointness, VOP3 promoted mnemonic parity, and representative decoding cross-checks with tools/rdna2_decode.py.
  • Includes in-memory negative controls (mutated table entries and unmapped opcodes) confirming assertions catch regressions.
  • Does not touch any shared files.

Tested

AI-assisted.

Ran on Windows 11 (Python 3.12.10, stdlib-only):

  • python -I tests/test_rdna2_isa_tables.py -v -> Ran 5 tests in 0.003s — OK
  • python -I -m compileall -q make_game.py tools tests -> exit code 0

Checklist

  • No game data (no extracted assets, keys, hashes, or disassembly from the game).
  • Translator rule N/A (test-only PR; no changes to tools/rdna2spirv.py).
> Carried over from **old PR 10026** by `Ritolino` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/10026`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `Ritolino`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Claimed in the coordination issue as: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116995348 ### What and why Adds standalone `stdlib-only` unit tests (`tests/test_rdna2_isa_tables.py`) for `tools/rdna2_isa_tables.py` and its cross-checks against `tools/rdna2_decode.py`. - Verifies structural integrity of all expected RDNA2 opcode/operand tables, VOP3 vs VOP3B disjointness, VOP3 promoted mnemonic parity, and representative decoding cross-checks with `tools/rdna2_decode.py`. - Includes in-memory negative controls (mutated table entries and unmapped opcodes) confirming assertions catch regressions. - Does not touch any shared files. ### Tested AI-assisted. Ran on Windows 11 (Python 3.12.10, stdlib-only): - `python -I tests/test_rdna2_isa_tables.py -v` -> `Ran 5 tests in 0.003s — OK` - `python -I -m compileall -q make_game.py tools tests` -> exit code 0 ### Checklist - [x] No game data (no extracted assets, keys, hashes, or disassembly from the game). - [x] Translator rule N/A (test-only PR; no changes to `tools/rdna2spirv.py`).
aslan2142 commented 2026-11-24 19:18:31 +00:00

This carry-over of old upstream PR 10026 has been taken over in #1019, so I'm closing this draft as #17 describes. The branch old-pr/10026 stays.

AI-assisted (Claude Code, Claude Opus 5.5).

This carry-over of old upstream PR 10026 has been taken over in #1019, so I'm closing this draft as #17 describes. The branch `old-pr/10026` stays. AI-assisted (Claude Code, Claude Opus 5.5).
Sign in to join this conversation.
No description provided.