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

Issue 10692099: Fix int.compareTo. (Closed)

Created:
8 years, 5 months ago by floitsch
Modified:
8 years, 5 months ago
CC:
reviews_dartlang.org, hausner
Visibility:
Public.

Description

Fix int.compareTo. In particular we want: 0.compareTo(-0.0) => 1 Committed: https://code.google.com/p/dart/source/detail?r=9459

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address comments. #

Total comments: 6

Patch Set 3 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -5 lines) Patch
M runtime/lib/integers.dart View 1 2 1 chunk +22 lines, -5 lines 0 comments Download
A tests/corelib/compare_to2_test.dart View 1 2 1 chunk +90 lines, -0 lines 0 comments Download
A tests/corelib/compare_to_test.dart View 1 1 chunk +134 lines, -0 lines 0 comments Download
M tests/corelib/corelib.status View 1 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
floitsch
8 years, 5 months ago (2012-07-05 18:11:46 UTC) #1
Lasse Reichstein Nielsen
LGTM with comments. https://chromiumcodereview.appspot.com/10692099/diff/1/runtime/lib/integers.dart File runtime/lib/integers.dart (right): https://chromiumcodereview.appspot.com/10692099/diff/1/runtime/lib/integers.dart#newcode51 runtime/lib/integers.dart:51: int bitAndFromInteger(int other) native "Integer_bitAndFromInteger"; These ...
8 years, 5 months ago (2012-07-06 08:56:17 UTC) #2
floitsch
Maybe PTAL. The compare_to2_test needs changes in the way we handle relations between integers and ...
8 years, 5 months ago (2012-07-06 13:18:55 UTC) #3
Lasse Reichstein Nielsen
LGTM https://chromiumcodereview.appspot.com/10692099/diff/3002/runtime/lib/integers.dart File runtime/lib/integers.dart (right): https://chromiumcodereview.appspot.com/10692099/diff/3002/runtime/lib/integers.dart#newcode113 runtime/lib/integers.dart:113: return -d.compareTo(this.toDouble()); Please put parentheses around call. This ...
8 years, 5 months ago (2012-07-09 07:38:00 UTC) #4
floitsch
8 years, 5 months ago (2012-07-09 07:56:31 UTC) #5
https://chromiumcodereview.appspot.com/10692099/diff/3002/runtime/lib/integer...
File runtime/lib/integers.dart (right):

https://chromiumcodereview.appspot.com/10692099/diff/3002/runtime/lib/integer...
runtime/lib/integers.dart:113: return -d.compareTo(this.toDouble());
On 2012/07/09 07:38:00, Lasse Reichstein Nielsen wrote:
> Please put parentheses around call. This looks like (even if it isn't) a call
on
> "-d".

Done.

https://chromiumcodereview.appspot.com/10692099/diff/3002/tests/corelib/compa...
File tests/corelib/compare_to2_test.dart (right):

https://chromiumcodereview.appspot.com/10692099/diff/3002/tests/corelib/compa...
tests/corelib/compare_to2_test.dart:63: mnan,
On 2012/07/09 07:38:00, Lasse Reichstein Nielsen wrote:
> Should nan and mnan not be equal? If not, are nan and nan not equal?

Done.

https://chromiumcodereview.appspot.com/10692099/diff/3002/tests/corelib/compa...
tests/corelib/compare_to2_test.dart:77: print("($left).compareTo($right) failed
"
On 2012/07/09 07:38:00, Lasse Reichstein Nielsen wrote:
> Can't we pass a message to Expect.equals instead of printing it manually?

Done.

Powered by Google App Engine
This is Rietveld 408576698