Skip to content

Overlapping partial matches causes a higher than possible match value.#5682

Merged
AlexCue987 merged 3 commits intomasterfrom
kantis/issue-5677
Feb 17, 2026
Merged

Overlapping partial matches causes a higher than possible match value.#5682
AlexCue987 merged 3 commits intomasterfrom
kantis/issue-5677

Conversation

@Kantis
Copy link
Copy Markdown
Member

@Kantis Kantis commented Feb 12, 2026

Fixed by only including the best partial match for any given range in the expected value.

fixes #5677

Fixed by only including the best partial match for any given range in the expected value.

fixes #5677
@Kantis Kantis requested a review from a team as a code owner February 12, 2026 20:44

// In case of overlapping partial matches, we eliminate the overlapping ones and only include the longest match
// for any given slice of the expected collection.
private fun List<PartialCollectionMatch>.filterOverlapping(): List<PartialCollectionMatch> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to make this function internal and unit test it explicitly?

Copy link
Copy Markdown
Member

@AlexCue987 AlexCue987 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll add tests in the next PR

@AlexCue987 AlexCue987 added this pull request to the merge queue Feb 16, 2026
Merged via the queue into master with commit 4b06c08 Feb 17, 2026
12 checks passed
@AlexCue987 AlexCue987 deleted the kantis/issue-5677 branch February 17, 2026 00:07
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.

list.shouldEndWith fails with IllegalArgumentException

2 participants