Skip to content

test(reader): replace LayoutKindTest boolean matrix with a kind enum#94

Merged
dfa1 merged 1 commit into
mainfrom
layout-test-cleanup
Jun 20, 2026
Merged

test(reader): replace LayoutKindTest boolean matrix with a kind enum#94
dfa1 merged 1 commit into
mainfrom
layout-test-cleanup

Conversation

@dfa1

@dfa1 dfa1 commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Follow-up to #93. The LayoutKindTest provider was a 5-boolean-per-row identity matrix:

Arguments.of(Layout.FLAT,    true, false, false, false, false),
Arguments.of(Layout.CHUNKED, false, true, false, false, false),
...

Every row encodes one fact — "exactly this kind's predicate is true." Replace the matrix with a Kind enum pairing each encoding id with its predicate, driven by @EnumSource:

for (Kind other : Kind.values()) {
    assertThat(other.predicate.test(sut))
            .as("%s on %s", other, kind.encodingId)
            .isEqualTo(other == kind);
}

other == kind states the intent directly. Same mutation coverage — each predicate is still asserted true for its own id and false for the others; the Layout kind mutants stay fully killed (reader still 5 survivors, all accepted/out-of-scope).

🤖 Generated with Claude Code

The 5-boolean-per-row provider was an identity matrix encoding a single fact:
"exactly this kind's predicate is true." Replace it with a Kind enum pairing
each encoding id with its predicate, driven by @EnumSource; the assertion
`other == kind` expresses the intent directly. Same mutation coverage — every
predicate is still asserted true for its own id and false for the others, and
the Layout kind mutants stay fully killed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dfa1 dfa1 merged commit 2c19851 into main Jun 20, 2026
6 checks passed
@dfa1 dfa1 deleted the layout-test-cleanup branch June 20, 2026 13:51
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