Skip to content

core: refactor tests/pattern.rs tests - #161592

Open
pacak wants to merge 1 commit into
rust-lang:mainfrom
pacak:change-pattern-tests
Open

core: refactor tests/pattern.rs tests#161592
pacak wants to merge 1 commit into
rust-lang:mainfrom
pacak:change-pattern-tests

Conversation

@pacak

@pacak pacak commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Firstly, combine functions and results lists into a single list with 'function => result' pairs. This makes it easier to match function with its result.

Secondly, eliminate InRange step so that it's easier to notice series of matches or rejects.

I also added a variant to test_stress_indices that matches stuff with |_| true which wasn't covered.

This commit is extracted from #160971

Firstly, combine functions and results lists into a single list with
'function => result' pairs.  This makes it easier to match function
with its result.

Secondly, eliminate InRange step so that it's easier to notice series
of matches or rejects.

@pacak: I added a variant to test_stress_indices that matches stuff
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 23, 2026
@rustbot

rustbot commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: libs
  • libs expanded to 12 candidates
  • Random selection from JohnTitor, Mark-Simulacrum, clarfonthey, nia-e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants