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

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

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 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 | « tests/corelib/compare_to2_test.dart ('k') | tests/corelib/const_list_literal_test.dart » ('j') | 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 for testing Math.min and Math.max. 4 // Dart test for testing Math.min and Math.max.
5 5
6 import "package:expect/expect.dart";
7
8 negate(x) => -x; 6 negate(x) => -x;
9 7
10 main() { 8 main() {
11 // Test matrix: 9 // Test matrix:
12 // -inf < -499.0 == -499 < -0.0 < 0.0 == 0 < 499.0 == 499 < +inf < -NaN, NaN. 10 // -inf < -499.0 == -499 < -0.0 < 0.0 == 0 < 499.0 == 499 < +inf < -NaN, NaN.
13 var inf = double.INFINITY; 11 var inf = double.INFINITY;
14 var nan = double.NAN; 12 var nan = double.NAN;
15 var mnan = negate(nan); 13 var mnan = negate(nan);
16 14
17 Expect.equals(0, (-inf).compareTo(-inf)); 15 Expect.equals(0, (-inf).compareTo(-inf));
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 Expect.equals(1, nan.compareTo(-499)); 125 Expect.equals(1, nan.compareTo(-499));
128 Expect.equals(1, nan.compareTo(-0.0)); 126 Expect.equals(1, nan.compareTo(-0.0));
129 Expect.equals(1, nan.compareTo(0)); 127 Expect.equals(1, nan.compareTo(0));
130 Expect.equals(1, nan.compareTo(0.0)); 128 Expect.equals(1, nan.compareTo(0.0));
131 Expect.equals(1, nan.compareTo(499.0)); 129 Expect.equals(1, nan.compareTo(499.0));
132 Expect.equals(1, nan.compareTo(499)); 130 Expect.equals(1, nan.compareTo(499));
133 Expect.equals(1, nan.compareTo(inf)); 131 Expect.equals(1, nan.compareTo(inf));
134 Expect.equals(0, nan.compareTo(nan)); 132 Expect.equals(0, nan.compareTo(nan));
135 Expect.equals(0, nan.compareTo(mnan)); 133 Expect.equals(0, nan.compareTo(mnan));
136 } 134 }
OLDNEW
« no previous file with comments | « tests/corelib/compare_to2_test.dart ('k') | tests/corelib/const_list_literal_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698