-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 some tests in printf.jl for BigFloat #12884
Conversation
@test( @sprintf( "%#10.5g", 123.4 ) == " 123.40") | ||
@test( @sprintf( "%-10.5g", 123.4 ) == "123.4 ") | ||
@test( @sprintf( "%-+10.5g", 123.4 ) == "+123.4 ") | ||
for (val, res) in ((12345678., "1.23457e+07"), (1234567.8, "1.23457e+06"), (123456.78, "123457"), (12345.678, "12345.7"), (12340000.0, "1.234e+07")) |
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.
Maybe line breaks?
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 were zero line breaks in the original file, I can add them before the sections (where there are #
comments) if you think it would make it easier to read.
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.
All I see is that before it was easy to read now it is hard. Lining up the tuples would imho make it nicer. Similarly to
Line 173 in 349a4e1
for (fname, elty, ret_type) in ((:dnrm2_,:Float64,:Float64), |
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, thanks, that's a good suggestion. I was just striving for code coverage.
Better format test code
80f5c6f
to
113e9e5
Compare
@KristofferC Hopefully you like this even better than the original file. Thanks for the suggestion! Anything else to make it better? |
Once again, the OOM killer strikes! Nothing to do with my changes though. |
Add some tests in printf.jl for BigFloat
Added BigFloat tests, make the code a bit more general.