-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
BTreeMap testing: introduce symbolic constants and use height consistently #70506
Conversation
e2266ac
to
e92d740
Compare
Thanks a lot, this helps to make these tests much less magic. :) |
📌 Commit e92d740 has been approved by |
Rollup of 3 pull requests Successful merges: - rust-lang#68692 (impl From<[T; N]> for Vec<T>) - rust-lang#70101 (Add copy bound to atomic & numeric intrinsics) - rust-lang#70506 (BTreeMap testing: introduce symbolic constants and use height consistently) Failed merges: r? @ghost
@@ -519,7 +528,7 @@ fn test_range_1000() { | |||
#[cfg(not(miri))] // Miri is too slow | |||
let size = 1000; | |||
#[cfg(miri)] | |||
let size = 144; // to obtain height 3 tree (having edges to both kinds of nodes) | |||
let size = MIN_INSERTS_HEIGHT_2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this unfortunately broke the build in Miri as the type is now usize
instead of u32
... see #70559
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also forgot to check Linux builds and debug assertions lately. So I'll just push here, I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYM "push here"? This PR landed already...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
miri-test-libstd also enables debug assertions, so that part is covered (also I believe some CI runners have debug assertions enabled).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I misinterpreted. Thanks for fixing.
I'm pretty sure the ordinary PR checks a few months ago, when there were 4 of them, did not include debug assertions, so I did those myself. And --no-doc
to test benchmarks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the PR runner probably has debug assertions disabled, but some others at least used to have them enabled.
…mulacrum fix BTreeMap test compilation with Miri This got broken by rust-lang#70506
Doesn't change what or how much is tested, except for some exact integer types, just for convenience and because
node::CAPACITY
is a usize.r? @RalfJung