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

Side by Side Diff: tests/language/arithmetic_test.dart

Issue 12334080: For Doubl erounding call C-function instead of attempting to inline it. Fixes issue 8760. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 months 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
« no previous file with comments | « sdk/lib/scalarlist/simd128.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Dart test program to test arithmetic operations. 4 // Dart test program to test arithmetic operations.
5 5
6 library arithmetic_test; 6 library arithmetic_test;
7 import 'dart:math'; 7 import 'dart:math';
8 8
9 class ArithmeticTest { 9 class ArithmeticTest {
10 10
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 // Smi. 272 // Smi.
273 Expect.equals(0, (0).round()); 273 Expect.equals(0, (0).round());
274 Expect.equals(1, (1).round()); 274 Expect.equals(1, (1).round());
275 Expect.equals(-1, (-1).round()); 275 Expect.equals(-1, (-1).round());
276 // Big. 276 // Big.
277 Expect.equals(big, big.round()); 277 Expect.equals(big, big.round());
278 Expect.equals(-big, (-big).round()); 278 Expect.equals(-big, (-big).round());
279 // Double. 279 // Double.
280 Expect.equals(3.0, (2.6).round()); 280 Expect.equals(3.0, (2.6).round());
281 Expect.equals(-3.0, (-2.6).round()); 281 Expect.equals(-3.0, (-2.6).round());
282 Expect.equals(3.0, (2.5).round());
283 Expect.equals(-3.0, (-2.5).round());
282 Expect.equals(0.0, (0.0).round()); 284 Expect.equals(0.0, (0.0).round());
283 Expect.equals(0.0, (0.1).round()); 285 Expect.equals(0.0, (0.1).round());
284 Expect.equals(false, (0.0).round().isNegative); 286 Expect.equals(false, (0.0).round().isNegative);
285 Expect.equals(false, (0.1).round().isNegative); 287 Expect.equals(false, (0.1).round().isNegative);
286 Expect.equals(-0.0, (-0.0).round()); 288 Expect.equals(-0.0, (-0.0).round());
287 Expect.equals(-0.0, (-0.3).round()); 289 Expect.equals(-0.0, (-0.3).round());
288 Expect.equals(2.0, (2.1).round()); 290 Expect.equals(2.0, (2.1).round());
289 Expect.equals(-2.0, (-2.1).round()); 291 Expect.equals(-2.0, (-2.1).round());
290 Expect.equals(1.0, (0.5).round()); 292 Expect.equals(1.0, (0.5).round());
291 Expect.equals(0.0, (0.49999999999999994).round()); 293 Expect.equals(0.0, (0.49999999999999994).round());
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 runOne(); 440 runOne();
439 testSmiDivDeopt(); 441 testSmiDivDeopt();
440 testSqrtDeopt(); 442 testSqrtDeopt();
441 } 443 }
442 } 444 }
443 } 445 }
444 446
445 main() { 447 main() {
446 ArithmeticTest.testMain(); 448 ArithmeticTest.testMain();
447 } 449 }
OLDNEW
« no previous file with comments | « sdk/lib/scalarlist/simd128.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698