Skip to content

FRLG BagDetector: screenshot tests for the current detector - #86

Closed
dayfine wants to merge 14 commits into
mainfrom
frlg/bag-detector-tests
Closed

dayfine wants to merge 14 commits into
mainfrom
frlg/bag-detector-tests

Conversation

@dayfine

@dayfine dayfine commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Adds screenshot tests for FRLG's BagDetector, which had none, against the current code.

  • PokemonFRLG_BagDetector_Tests.cpp/.h, registered from PokemonFRLG_Tests.cpp.
  • Bag screens: the Items and Key Items pockets at the top of their lists.
  • Not bag screens: a party menu, a box screen and the overworld.
  • The new images are on dayfine/CommandLineTests branch frlg/bag-detector-images (PokemonFRLG/Bag/).

Testing

  • Images captured on a lab Switch running LeafGreen; checked with a local build (CI checks out upstream CommandLineTests, which does not have these images yet).
  • A scrolled-down pocket, which the current detector misses, is left to the fix that builds on this.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

dayfine and others added 14 commits October 29, 2026 21:03
The Items pocket at the top of its list is the bag; a party menu, a box
screen and the overworld are not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
The red up-arrow drawn over the bag's top frame once the pocket list is
scrolled made the check fail, so a scrolled bag read as no bag. The
strip now stops short of it, and the scrolled test expects a bag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…with no bag

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Register the tests in the detector's own files, as the other FRLG
detectors do, and drop the negative controls that read images from
other detectors' directories (Party/Party_1.png, Box/BoxSelection_White.png).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…ector tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Take the upstream PR's version of the Bag detector tests: they now live
in PokemonFRLG_BagDetector.cpp/.h, and the separate _Tests files are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine

dayfine commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Obsolete: merged upstream as PokemonAutomation#1771 (the BagDetector files on this branch match upstream main).

@dayfine dayfine closed this Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant