-
-
Notifications
You must be signed in to change notification settings - Fork 411
Conversation
|
Thanks for your pull request and interest in making D better, @Luhrel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + druntime#2972" |
|
I don't see any changes in any tests, how can that be? |
|
Because this is blocking a dmd PR and NFC. The tests are in that. Note that the first diff is used in assert messages so any change will show up. If that isn't covered by tests I'd be surprised. The second one is for debug only. |
There is one test, but it does not include druntime/test/exceptions/src/assert_fail.d Lines 62 to 67 in b57ca7c
|
dd7a394 to
dbbb785
Compare
dbbb785 to
4e45509
Compare
4e45509 to
2dc6860
Compare
c2bad91 to
feaa967
Compare
test/exceptions/src/assert_fail.d
Outdated
| test(1.5, 2.5, "1.5 != 2.5"); | ||
| test(float.max, -float.max, "3.40282e+38 != -3.40282e+38"); | ||
| test(double.max, -double.max, "1.79769e+308 != -1.79769e+308"); | ||
| test(real.max, -real.max, "1.18973e+4932 != -1.18973e+4932"); |
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.
Please use another constant, real isn't 80-bit for most targets.
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 this way ?
import std.conv : to;
//test(real.max, -real.max, "1.18973e+4932 != -1.18973e+4932");
test(real.max, -real.max, real.max.to!string ~ " != -" ~ real.max.to!string);
How shall I test this with a number which change depending of the platform ?
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.
Well, real.max seems totally arbitrary, so any nicely representable value should do (5.25L or whatever). std.conv.to is in Phobos and so not suited for a druntime test.
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.
Changed to:
test(5.25L, -5.25L, "5.25 != -5.25");
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.
ae499e2 to
91ddc63
Compare
755eaf8 to
fd5c6d1
Compare
2c5d192 to
a6a6cdb
Compare
76ff913 to
3119963
Compare
3119963 to
2c261b3
Compare
Blocking dlang/dmd#10872