mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
Use -[NSNumber numberWithDouble:] for doubles
Found by -fsanitize=undefined: [ RUN ] Launchd.CFPropertyToLaunchData_FloatingPoint ../../../util/mac/launchd_test.mm:82:33: runtime error: value 1.79769e+308 is outside the range of representable values of type 'float' [ OK ] Launchd.CFPropertyToLaunchData_FloatingPoint (2 ms) TEST=crashpad_util_test Launchd.CFPropertyToLaunchData_FloatingPoint BUG= R=rsesek@chromium.org Review URL: https://codereview.chromium.org/1302843004 .
This commit is contained in:
parent
899821d4c7
commit
5064aeb784
@ -78,12 +78,12 @@ TEST(Launchd, CFPropertyToLaunchData_FloatingPoint) {
|
||||
@-1.0,
|
||||
[NSNumber numberWithFloat:std::numeric_limits<float>::min()],
|
||||
[NSNumber numberWithFloat:std::numeric_limits<float>::max()],
|
||||
[NSNumber numberWithFloat:std::numeric_limits<double>::min()],
|
||||
[NSNumber numberWithFloat:std::numeric_limits<double>::max()],
|
||||
[NSNumber numberWithDouble:std::numeric_limits<double>::min()],
|
||||
[NSNumber numberWithDouble:std::numeric_limits<double>::max()],
|
||||
@3.1415926535897932,
|
||||
[NSNumber numberWithFloat:std::numeric_limits<double>::infinity()],
|
||||
[NSNumber numberWithFloat:std::numeric_limits<double>::quiet_NaN()],
|
||||
[NSNumber numberWithFloat:std::numeric_limits<double>::signaling_NaN()],
|
||||
[NSNumber numberWithDouble:std::numeric_limits<double>::infinity()],
|
||||
[NSNumber numberWithDouble:std::numeric_limits<double>::quiet_NaN()],
|
||||
[NSNumber numberWithDouble:std::numeric_limits<double>::signaling_NaN()],
|
||||
};
|
||||
|
||||
for (size_t index = 0; index < arraysize(double_nses); ++index) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user