Skip to content

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

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
pacak:change-pattern-tests
Aug 24, 2026
Merged

core: refactor tests/pattern.rs tests#161592
rust-bors[bot] merged 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

@pacak

pacak commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

r? @nia-e

@rustbot rustbot assigned nia-e and unassigned Mark-Simulacrum Aug 23, 2026
@nia-e

nia-e commented Aug 23, 2026

Copy link
Copy Markdown
Member

well this is a nice little cleanup. thanks!

@bors r+

@rust-bors

rust-bors Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 8662be8 has been approved by nia-e

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 23, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 23, 2026
core: refactor tests/pattern.rs tests

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 rust-lang#160971
rust-bors Bot pushed a commit that referenced this pull request Aug 23, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #161187 (add `Complex<T>` layout tests for straightforward targets)
 - #161524 (Put back `tests/rustdoc-gui/search-result-display.goml`)
 - #161592 (core: refactor tests/pattern.rs tests)
 - #161602 (Fix flakyness issue for `tests/rustdoc-gui/headers-color.goml`)
 - #155254 (Recover on attribute in use tree)
 - #158695 (Replace `CrateDump` with the Debug impl from `CStore`)
 - #159456 (Fix the reporting of layout normalization failures in transmute checks)
 - #160452 (-Ctarget-feature is not unsafe (any more))
 - #161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios")
 - #161166 (add crashtests [5/N], remove unused aux files )
 - #161569 (Bump cfg_aliases to 0.2.2)
 - #161573 (re-bless `pretty-std` on windows)
 - #161588 (update eyre)
 - #161589 (std: reduce visibility of some internal OsStr related types)
 - #161598 ([Bootstrap] Pass exact CI `llvm-config` executable path)
 - #161601 (Path: use optimized is_empty() method)
 - #161604 (coretests: Add a few tests for backward multibyte predicate)
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 24, 2026
core: refactor tests/pattern.rs tests

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 rust-lang#160971
rust-bors Bot pushed a commit that referenced this pull request Aug 24, 2026
Rollup of 24 pull requests

Successful merges:

 - #161586 (miri subtree update)
 - #161187 (add `Complex<T>` layout tests for straightforward targets)
 - #161524 (Put back `tests/rustdoc-gui/search-result-display.goml`)
 - #161592 (core: refactor tests/pattern.rs tests)
 - #161602 (Fix flakyness issue for `tests/rustdoc-gui/headers-color.goml`)
 - #152433 (Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal`)
 - #155254 (Recover on attribute in use tree)
 - #158695 (Replace `CrateDump` with the Debug impl from `CStore`)
 - #159456 (Fix the reporting of layout normalization failures in transmute checks)
 - #159940 (Eliminate some buggy `unreachable!()`s in `expand_[option_]env()`)
 - #160452 (-Ctarget-feature is not unsafe (any more))
 - #161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios")
 - #161166 (add crashtests [5/N], remove unused aux files )
 - #161294 (add crashtests [6/N])
 - #161552 (also trigger overflow FCW when going from overflow -> error)
 - #161569 (Bump cfg_aliases to 0.2.2)
 - #161573 (re-bless `pretty-std` on windows)
 - #161580 (Add codegen test for redundant bit mask after a range check)
 - #161588 (update eyre)
 - #161589 (std: reduce visibility of some internal OsStr related types)
 - #161598 ([Bootstrap] Pass exact CI `llvm-config` executable path)
 - #161601 (Path: use optimized is_empty() method)
 - #161604 (coretests: Add a few tests for backward multibyte predicate)
 - #161615 (interpret: make validate_c_variadic_compatible_ty public)
rust-bors Bot pushed a commit that referenced this pull request Aug 24, 2026
Rollup of 22 pull requests

Successful merges:

 - #161586 (miri subtree update)
 - #161187 (add `Complex<T>` layout tests for straightforward targets)
 - #161524 (Put back `tests/rustdoc-gui/search-result-display.goml`)
 - #161592 (core: refactor tests/pattern.rs tests)
 - #161602 (Fix flakyness issue for `tests/rustdoc-gui/headers-color.goml`)
 - #152433 (Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal`)
 - #155254 (Recover on attribute in use tree)
 - #158695 (Replace `CrateDump` with the Debug impl from `CStore`)
 - #159456 (Fix the reporting of layout normalization failures in transmute checks)
 - #159940 (Eliminate some buggy `unreachable!()`s in `expand_[option_]env()`)
 - #160452 (-Ctarget-feature is not unsafe (any more))
 - #161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios")
 - #161552 (also trigger overflow FCW when going from overflow -> error)
 - #161569 (Bump cfg_aliases to 0.2.2)
 - #161573 (re-bless `pretty-std` on windows)
 - #161580 (Add codegen test for redundant bit mask after a range check)
 - #161588 (update eyre)
 - #161589 (std: reduce visibility of some internal OsStr related types)
 - #161598 ([Bootstrap] Pass exact CI `llvm-config` executable path)
 - #161601 (Path: use optimized is_empty() method)
 - #161604 (coretests: Add a few tests for backward multibyte predicate)
 - #161615 (interpret: make validate_c_variadic_compatible_ty public)
@rust-bors
rust-bors Bot merged commit 2fb7589 into rust-lang:main Aug 24, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Aug 24, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 24, 2026
Rollup merge of #161592 - pacak:change-pattern-tests, r=nia-e

core: refactor tests/pattern.rs tests

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants