test(libSceDiscMap): assert runtime error on unimplemented sceDiscMapGetPackageSize #9124

Closed
al3w0f205 wants to merge 1 commit from upstream-pr/9124 into main
al3w0f205 commented 2026-10-21 12:40:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by al3w0f205 on 2026-10-21T12:40:52Z.


What

Adds test coverage for \sceDiscMapGetPackageSize\ in \core/libs/tests/GuestDiscMap.cpp:

  • Asserts that \sceDiscMapGetPackageSize\ throws \std::runtime_error\ as an unimplemented path.

Tested

  • Ran \python tools/check_conventions.py --base origin/main\ cleanly (0 errors).

Checklist

  • Based on current \main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; silent stubs are listed under Silent stubs
  • No notes, investigation .md files or images added
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4951702944 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9124). Originally posted by [al3w0f205](https://github.com/al3w0f205) on 2026-10-21T12:40:52Z. --- ### What Adds test coverage for \sceDiscMapGetPackageSize\ in \core/libs/tests/GuestDiscMap.cpp\: - Asserts that \sceDiscMapGetPackageSize\ throws \std::runtime_error\ as an unimplemented path. ### Tested - Ran \python tools/check_conventions.py --base origin/main\ cleanly (0 errors). ### Checklist - [x] Based on current \main\; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw; silent stubs are listed under Silent stubs - [x] No notes, investigation .md files or images added - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-21 12:52:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T12:52:53Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 8647 core/libs/tests/GuestDiscMap.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6316478518 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9124#issuecomment-6316478518). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-21T12:52:53Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 8647](https://www.github.com/boykopovar/AnyPS5/pull/8647) | `core/libs/tests/GuestDiscMap.cpp` |
oneandonlydean commented 2026-10-21 19:09:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T19:09:25Z.


@al3w0f205 thanks for this one.

I'm keeping tests to real behaviour and argument validation, not asserting that a not-yet-implemented call throws, since that kind of test breaks the moment someone implements the function (same as we settled in #6058).

In core/libs/tests/GuestDiscMap.cpp (main), please drop the sceDiscMapGetPackageSize(0, nullptr, nullptr) try/catch and Require(threwPackageSize, "sceDiscMapGetPackageSize must throw runtime_error");, plus the declaration and the <stdexcept> include. The function is still a stub.

Every assertion this PR adds is of that kind, so once they're dropped nothing is left. You could swap in tests for real behaviour or argument checks in this module instead, or close it if you'd rather.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6324287652 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9124#issuecomment-6324287652). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T19:09:25Z. --- @al3w0f205 thanks for this one. I'm keeping tests to real behaviour and argument validation, not asserting that a not-yet-implemented call throws, since that kind of test breaks the moment someone implements the function (same as we settled in #6058). In `core/libs/tests/GuestDiscMap.cpp` (`main`), please drop the `sceDiscMapGetPackageSize(0, nullptr, nullptr)` try/catch and `Require(threwPackageSize, "sceDiscMapGetPackageSize must throw runtime_error");`, plus the declaration and the `<stdexcept>` include. The function is still a stub. Every assertion this PR adds is of that kind, so once they're dropped nothing is left. You could swap in tests for real behaviour or argument checks in this module instead, or close it if you'd rather.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
boykopovar/AnyPS5!9124
No description provided.