-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Add integer to string formatting tests #138546
base: master
Are you sure you want to change the base?
Add integer to string formatting tests #138546
Conversation
09c42c7
to
47b2f7f
Compare
This comment has been minimized.
This comment has been minimized.
47b2f7f
to
b2b1ed2
Compare
This comment has been minimized.
This comment has been minimized.
FYI (very recent change) alloc tests are now a separate package, alloctests EDIT: see #136642 |
b2b1ed2
to
bacd57a
Compare
Wow, talk about bad luck. 😆 Thanks for the links @jieyouxu! Updated the PR to use |
library/alloctests/tests/num.rs
Outdated
|
||
fn assert_nb<Int: ToString + FromStr + Debug + Display + Eq>(value: Int) { | ||
let s = value.to_string(); | ||
let s2 = format!("{}", value); |
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.
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.
Sure, done!
This comment has been minimized.
This comment has been minimized.
1cf1166
to
25900c2
Compare
Forgot to run |
As discussed in #136264, there doesn't seem to have tests to ensure that int to string conversion is performed correctly, only sporadic tests here and there. Now we have some basic tests. :)
r? @Mark-Simulacrum