Skip to content

one_d4: E2E tests for remaining 5 motifs #1073

@aaylward

Description

@aaylward

Context

MotifE2ETest covers 13 of 19 motifs. The remaining 5 have solid unit tests in their detector test classes but no end-to-end coverage.

Missing E2E tests

Motif Notes
discovered_check Requires custom-FEN start position — GameReplayer always starts from Board.ofStandard() and the Fried Liver variant doesn't work (absolute pin). Could be unblocked by adding SetUp/FEN header support to GameReplayer.
promotion_with_checkmate Need a short game ending in promotion-to-queen with checkmate.
smothered_mate Need a game with a knight smothered mate pattern (Philidor's Legacy style).
double_check Need a game with a discovered double check position.
zugzwang Need a blocked endgame (≤8 pieces, no queens, few/no pawns).

Possible approach for discovered_check

Add [SetUp "1"][FEN "..."] header support to GameReplayer so it can start from a custom position. The PgnParser already parses headers into a map; the replayer would just need to check for SetUp and initialize Board.ofFEN(fen) instead of Board.ofStandard().

Related

Tracked in PR #1071.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions