Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1109)

Issue 28973002: Add isFinite getter to num. (Closed)

Created:
7 years, 2 months ago by Lasse Reichstein Nielsen
Modified:
7 years, 2 months ago
Reviewers:
Kathy Walrath, floitsch
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 7

Patch Set 2 : Addressed some comments. #

Patch Set 3 : Change comments to not use "whether". #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -7 lines) Patch
M runtime/lib/double.dart View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/lib/integers.dart View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/lib/js_number.dart View 1 1 chunk +2 lines, -0 lines 0 comments Download
M sdk/lib/core/num.dart View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
M tests/corelib/corelib.status View 1 1 chunk +1 line, -0 lines 0 comments Download
M tests/corelib/nan_infinity_test.dart View 1 1 chunk +58 lines, -7 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Lasse Reichstein Nielsen
7 years, 2 months ago (2013-10-18 11:17:08 UTC) #1
floitsch
LGTM. https://codereview.chromium.org/28973002/diff/1/sdk/lib/core/num.dart File sdk/lib/core/num.dart (right): https://codereview.chromium.org/28973002/diff/1/sdk/lib/core/num.dart#newcode156 sdk/lib/core/num.dart:156: * Whether the number is the double positive ...
7 years, 2 months ago (2013-10-18 11:54:59 UTC) #2
floitsch
Also I think the doc-writers don't like "wether x or y" in the dartdocs.
7 years, 2 months ago (2013-10-18 11:55:15 UTC) #3
Lasse Reichstein Nielsen
What would be the preferred alternative to "Whether foo" for boolean functions? https://codereview.chromium.org/28973002/diff/1/tests/corelib/nan_infinity_test.dart File tests/corelib/nan_infinity_test.dart ...
7 years, 2 months ago (2013-10-22 16:31:45 UTC) #4
Kathy Walrath
On 2013/10/22 16:31:45, Lasse Reichstein Nielsen wrote: > What would be the preferred alternative to ...
7 years, 2 months ago (2013-10-22 16:40:02 UTC) #5
Lasse Reichstein Nielsen
Committed patchset #3 manually as r29067 (presubmit successful).
7 years, 2 months ago (2013-10-23 10:21:23 UTC) #6
Lasse Reichstein Nielsen
7 years, 2 months ago (2013-10-23 10:21:37 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/28973002/diff/1/sdk/lib/core/num.dart
File sdk/lib/core/num.dart (right):

https://codereview.chromium.org/28973002/diff/1/sdk/lib/core/num.dart#newcode156
sdk/lib/core/num.dart:156: * Whether the number is the double positive or
negative infinity.
On 2013/10/18 11:54:59, floitsch wrote:
> double reads bad here.

Done.

https://codereview.chromium.org/28973002/diff/1/sdk/lib/core/num.dart#newcode163
sdk/lib/core/num.dart:163: * The only non-finite numbers are NaN and positive or
negative infinity.
On 2013/10/18 11:54:59, floitsch wrote:
> nit. I prefer:
> NaN, positive infinity and negative infinity.

Done.

https://codereview.chromium.org/28973002/diff/1/tests/corelib/nan_infinity_te...
File tests/corelib/nan_infinity_test.dart (right):

https://codereview.chromium.org/28973002/diff/1/tests/corelib/nan_infinity_te...
tests/corelib/nan_infinity_test.dart:50: Expect.isTrue(identical(double.NAN,
double.NAN));
Turned into multi-test that fails for dart2js.

Powered by Google App Engine
This is Rietveld 408576698