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

Side by Side Diff: tests/lib/math/min_max_test.dart

Issue 19482023: Fix math min/max for -0.0 case. Enable min_max_test to run in optimizing compiler as well. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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
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 for testing Math.min and Math.max. 4 // Dart test for testing Math.min and Math.max.
5 // VMOptions=--optimization-counter-threshold=10
5 6
6 library min_max_test; 7 library min_max_test;
7 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
8 import 'dart:math'; 9 import 'dart:math';
9 10
10 testMin() { 11 testMin() {
11 Expect.equals(0, min(0, 2)); 12 Expect.equals(0, min(0, 2));
12 Expect.equals(0, min(2, 0)); 13 Expect.equals(0, min(2, 0));
13 14
14 Expect.equals(-10, min(-10, -9)); 15 Expect.equals(-10, min(-10, -9));
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 Expect.isFalse(max(-inf, 0.0).isNegative); 515 Expect.isFalse(max(-inf, 0.0).isNegative);
515 Expect.isFalse(max(-inf, 0).isNegative); 516 Expect.isFalse(max(-inf, 0).isNegative);
516 Expect.isTrue(max(-inf, -0.0).isNegative); 517 Expect.isTrue(max(-inf, -0.0).isNegative);
517 Expect.isTrue(max(-inf, -499).isNegative); 518 Expect.isTrue(max(-inf, -499).isNegative);
518 Expect.isTrue(max(-inf, -499.0).isNegative); 519 Expect.isTrue(max(-inf, -499.0).isNegative);
519 Expect.isTrue(max(-inf, -inf).isNegative); 520 Expect.isTrue(max(-inf, -inf).isNegative);
520 } 521 }
521 522
522 main() { 523 main() {
523 testMin(); 524 testMin();
525 testMin();
526 testMax();
524 testMax(); 527 testMax();
525 } 528 }
OLDNEW
« runtime/vm/intermediate_language_ia32.cc ('K') | « tests/lib/lib.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698