Skip to content

State pictures are asked for apart from coverage - #84

Merged
ptescher merged 1 commit into
mainfrom
state-pictures
Nov 12, 2026
Merged

ptescher merged 1 commit into
mainfrom
state-pictures

Conversation

@ptescher

Copy link
Copy Markdown
Owner

First of three PRs for #67 (the switch for state pictures). Sharing starts by continuing and by checkpoints follow.

with_coverage() added two kinds of generated test: "Reaching «…»", which gives an expectation a verdict, and "Visiting the state after «…»", which only gives the state map a picture. On a system that is slow to set up, the second kind was most of a run.

What changes

  • Acceptance::with_coverage() adds the Reaching tests only.
  • Acceptance::with_state_pictures() adds the Visiting tests. Call it after with_coverage().
  • expectation-run still has both by default; --no-state-pictures leaves the Visiting tests out.
  • expectation plan --state-pictures prints them; --coverage alone no longer does.
  • expectation docs is unchanged: it still lists both kinds.

Behaviour change

Rust callers of with_coverage() that want the state map's pictures must now add .with_state_pictures().

A runner's results file holds its last run, so a quick run saved under the same --runner name as a full run replaces the full run's Visiting results. The book says to give a quick run its own runner name.

Tests

  • crates/harness/tests/state_pictures.rs: which tests each switch adds, that the order of the others is unchanged, and that every expectation's verdict is the same with and without pictures.
  • crates/remote/tests/state_pictures.rs: the real expectation-run binary with and without --no-state-pictures.
  • cargo test --workspace and cargo clippy --workspace --all-targets -- -D warnings pass locally.

🤖 Generated with Claude Code

with_coverage() added two kinds of generated test: one for each expectation no
story reaches, which gives it a verdict, and one for each state of the state
map no test passes through, which only gives the map a picture. Each arranges a
start of its own, and on a system that is slow to set up the second kind was
most of a run.

- Acceptance::with_coverage() adds the Reaching tests only
- Acceptance::with_state_pictures() adds the Visiting tests
- expectation-run has both, and --no-state-pictures leaves the second out
- expectation plan --state-pictures prints them; --coverage no longer does

Callers of with_coverage() that want the state map's pictures now add
with_state_pictures() after it.

Refs #67

Co-Authored-By: Claude <noreply@anthropic.com>
@ptescher
ptescher merged commit d0ece05 into main Nov 12, 2026
3 checks passed
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