Skip to content

coretests: move float tests from num to floats module and use a more flexible macro to generate them #141857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Jun 1, 2025

This makes some progress on #141726 by moving the float tests in num to floats and using a newer, more flexible macro to generate them. We also newly run these tests on f16 and f128 in const, and at runtime in Miri and for hosts where that works well enough.

I didn't yet deduplicate any tests or port the existing floats::f* tests to the macro, that can happen in a future PR.

try-job: x86_64-gnu-aux

@rustbot
Copy link
Collaborator

rustbot commented Jun 1, 2025

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 1, 2025
@RalfJung
Copy link
Member Author

RalfJung commented Jun 1, 2025

r? @tgross35

@rustbot rustbot assigned tgross35 and unassigned Mark-Simulacrum Jun 1, 2025
@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the coretests-floats branch from 77b3d3d to f3b4668 Compare June 1, 2025 14:49
@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together, I really like the way it turned out. Just a nit suggesting an example in the docs and optionally removing cfg(bootstrap). r=me after that and green CI (assuming the failure is unrelated)

@RalfJung RalfJung force-pushed the coretests-floats branch 3 times, most recently from 0c707f9 to fdadc1c Compare June 3, 2025 07:04
@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member Author

RalfJung commented Jun 3, 2025

That test is kind of silly inside coretests...

@RalfJung RalfJung force-pushed the coretests-floats branch from fdadc1c to bc0b999 Compare June 3, 2025 07:20
@RalfJung RalfJung force-pushed the coretests-floats branch from bc0b999 to d296c12 Compare June 3, 2025 07:33
@RalfJung
Copy link
Member Author

RalfJung commented Jun 3, 2025

@bors r=tgross35

@bors
Copy link
Collaborator

bors commented Jun 3, 2025

📌 Commit d296c12 has been approved by tgross35

It is now in the queue for this repository.

@bors bors 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 Jun 3, 2025
@bors
Copy link
Collaborator

bors commented Jun 4, 2025

☔ The latest upstream changes (presumably #141984) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 4, 2025
@RalfJung RalfJung force-pushed the coretests-floats branch from d296c12 to ccf9a89 Compare June 4, 2025 06:42
@RalfJung
Copy link
Member Author

RalfJung commented Jun 4, 2025

@bors r=tgross35

@bors
Copy link
Collaborator

bors commented Jun 4, 2025

📌 Commit ccf9a89 has been approved by tgross35

It is now in the queue for this repository.

@bors bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 4, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 4, 2025
coretests: move float tests from num to floats module and use a more flexible macro to generate them

This makes some progress on rust-lang#141726 by moving the float tests in `num` to `floats` and using a newer, more flexible macro to generate them. We also newly run these tests on f16 and f128 in const, and at runtime in Miri and for hosts where that works well enough.

I didn't yet deduplicate any tests or port the existing `floats::f*` tests to the macro, that can happen in a future PR.
bors added a commit that referenced this pull request Jun 4, 2025
Rollup of 9 pull requests

Successful merges:

 - #141271 (Streamline some attr parsing APIs)
 - #141570 (Fix incorrect eq_unspanned in TokenStream)
 - #141857 (coretests: move float tests from num to floats module and use a more flexible macro to generate them)
 - #141893 (remove `f16: From<u16>`)
 - #141924 (Lightly tweak docs for BTree{Map,Set}::extract_if)
 - #141939 (exact_div: add tests)
 - #141959 (Add more missing 2015 edition directives)
 - #142002 (redesign stage 0 std follow-ups part2)
 - #142007 (Improve some `Visitor` comments.)

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr
Copy link
Member

@bors r-
#142020 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 4, 2025
@RalfJung RalfJung force-pushed the coretests-floats branch from ccf9a89 to 7742d0e Compare June 4, 2025 14:32
@RalfJung
Copy link
Member Author

RalfJung commented Jun 4, 2025

@bors2 try

@rust-bors
Copy link

rust-bors bot commented Jun 4, 2025

⌛ Trying commit 7742d0e with merge 43707d4

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 4, 2025
coretests: move float tests from num to floats module and use a more flexible macro to generate them

This makes some progress on #141726 by moving the float tests in `num` to `floats` and using a newer, more flexible macro to generate them. We also newly run these tests on f16 and f128 in const, and at runtime in Miri and for hosts where that works well enough.

I didn't yet deduplicate any tests or port the existing `floats::f*` tests to the macro, that can happen in a future PR.

<!-- homu-ignore:start -->
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

    r? <reviewer name>
-->
<!-- homu-ignore:end -->

try-job: x86_64-gnu-aux
@rust-bors
Copy link

rust-bors bot commented Jun 4, 2025

☀️ Try build successful (CI)
Build commit: 43707d4 (43707d4503c551e49a91fdfb3a72ea975022d948)

@RalfJung
Copy link
Member Author

RalfJung commented Jun 4, 2025 via email

@bors
Copy link
Collaborator

bors commented Jun 4, 2025

📌 Commit 7742d0e has been approved by tgross35

It is now in the queue for this repository.

@bors bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 4, 2025
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. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants