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

Side by Side Diff: tests/corelib/big_integer_vm_test.dart

Issue 11191078: Make hashCode a getter and not a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // Testing Bigints. 4 // Testing Bigints.
5 // TODO(srdjan): Make sure the numbers are Bigint and not Mint or Smi. 5 // TODO(srdjan): Make sure the numbers are Bigint and not Mint or Smi.
6 6
7 #library("BigIntegerTest.dart"); 7 #library("BigIntegerTest.dart");
8 8
9 class BigIntegerTest { 9 class BigIntegerTest {
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 testBigintMul(); 161 testBigintMul();
162 testBigintModulo(); 162 testBigintModulo();
163 testBigintTruncDiv(); 163 testBigintTruncDiv();
164 testBigintDiv(); 164 testBigintDiv();
165 testBigintNegate(); 165 testBigintNegate();
166 testShiftAmount(); 166 testShiftAmount();
167 Expect.equals(1234567890123456, (1234567890123456).abs()); 167 Expect.equals(1234567890123456, (1234567890123456).abs());
168 Expect.equals(1234567890123456, (-1234567890123456).abs()); 168 Expect.equals(1234567890123456, (-1234567890123456).abs());
169 var a = 10000000000000000000; 169 var a = 10000000000000000000;
170 var b = 10000000000000000001; 170 var b = 10000000000000000001;
171 Expect.equals(false, a.hashCode() == b.hashCode()); 171 Expect.equals(false, a.hashCode == b.hashCode);
172 Expect.equals(true, a.hashCode() == (b - 1).hashCode()); 172 Expect.equals(true, a.hashCode == (b - 1).hashCode);
173 } 173 }
174 } 174 }
175 175
176 main() { 176 main() {
177 BigIntegerTest.testMain(); 177 BigIntegerTest.testMain();
178 } 178 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698