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

Unified Diff: tests/corelib_strong/compare_to_test.dart

Issue 2986503002: Migrate test block 4 to Dart 2.0. (Closed)
Patch Set: Merge with head Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/corelib_2/data_uri_test.dart ('k') | tests/corelib_strong/const_list_literal_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib_strong/compare_to_test.dart
diff --git a/tests/corelib_strong/compare_to_test.dart b/tests/corelib_strong/compare_to_test.dart
deleted file mode 100644
index 35d8f634179f7fb962f1710043b8dd4157143bc6..0000000000000000000000000000000000000000
--- a/tests/corelib_strong/compare_to_test.dart
+++ /dev/null
@@ -1,136 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Dart test for testing Math.min and Math.max.
-
-import "package:expect/expect.dart";
-
-negate(x) => -x;
-
-main() {
- // Test matrix:
- // -inf < -499.0 == -499 < -0.0 < 0.0 == 0 < 499.0 == 499 < +inf < -NaN, NaN.
- var inf = double.INFINITY;
- var nan = double.NAN;
- var mnan = negate(nan);
-
- Expect.equals(0, (-inf).compareTo(-inf));
- Expect.equals(-1, (-inf).compareTo(-499.0));
- Expect.equals(-1, (-inf).compareTo(-499));
- Expect.equals(-1, (-inf).compareTo(-0.0));
- Expect.equals(-1, (-inf).compareTo(0));
- Expect.equals(-1, (-inf).compareTo(0.0));
- Expect.equals(-1, (-inf).compareTo(499.0));
- Expect.equals(-1, (-inf).compareTo(499));
- Expect.equals(-1, (-inf).compareTo(inf));
- Expect.equals(-1, (-inf).compareTo(nan));
- Expect.equals(-1, (-inf).compareTo(mnan));
-
- Expect.equals(1, (-499.0).compareTo(-inf));
- Expect.equals(0, (-499.0).compareTo(-499.0));
- Expect.equals(0, (-499.0).compareTo(-499));
- Expect.equals(-1, (-499.0).compareTo(-0.0));
- Expect.equals(-1, (-499.0).compareTo(0));
- Expect.equals(-1, (-499.0).compareTo(0.0));
- Expect.equals(-1, (-499.0).compareTo(499.0));
- Expect.equals(-1, (-499.0).compareTo(499));
- Expect.equals(-1, (-499.0).compareTo(inf));
- Expect.equals(-1, (-499.0).compareTo(nan));
- Expect.equals(-1, (-499.0).compareTo(mnan));
-
- Expect.equals(1, (-499).compareTo(-inf));
- Expect.equals(0, (-499).compareTo(-499.0));
- Expect.equals(0, (-499).compareTo(-499));
- Expect.equals(-1, (-499).compareTo(-0.0));
- Expect.equals(-1, (-499).compareTo(0));
- Expect.equals(-1, (-499).compareTo(0.0));
- Expect.equals(-1, (-499).compareTo(499.0));
- Expect.equals(-1, (-499).compareTo(499));
- Expect.equals(-1, (-499).compareTo(inf));
- Expect.equals(-1, (-499).compareTo(nan));
- Expect.equals(-1, (-499).compareTo(mnan));
-
- Expect.equals(1, (-0.0).compareTo(-inf));
- Expect.equals(1, (-0.0).compareTo(-499.0));
- Expect.equals(1, (-0.0).compareTo(-499));
- Expect.equals(0, (-0.0).compareTo(-0.0));
- Expect.equals(-1, (-0.0).compareTo(0));
- Expect.equals(-1, (-0.0).compareTo(0.0));
- Expect.equals(-1, (-0.0).compareTo(499.0));
- Expect.equals(-1, (-0.0).compareTo(499));
- Expect.equals(-1, (-0.0).compareTo(inf));
- Expect.equals(-1, (-0.0).compareTo(nan));
- Expect.equals(-1, (-0.0).compareTo(mnan));
-
- Expect.equals(1, (0).compareTo(-inf));
- Expect.equals(1, (0).compareTo(-499.0));
- Expect.equals(1, (0).compareTo(-499));
- Expect.equals(1, (0).compareTo(-0.0));
- Expect.equals(0, (0).compareTo(0));
- Expect.equals(0, (0).compareTo(0.0));
- Expect.equals(-1, (0).compareTo(499.0));
- Expect.equals(-1, (0).compareTo(499));
- Expect.equals(-1, (0).compareTo(inf));
- Expect.equals(-1, (0).compareTo(nan));
- Expect.equals(-1, (0).compareTo(mnan));
-
- Expect.equals(1, (0.0).compareTo(-inf));
- Expect.equals(1, (0.0).compareTo(-499.0));
- Expect.equals(1, (0.0).compareTo(-499));
- Expect.equals(1, (0.0).compareTo(-0.0));
- Expect.equals(0, (0.0).compareTo(0));
- Expect.equals(0, (0.0).compareTo(0.0));
- Expect.equals(-1, (0.0).compareTo(499.0));
- Expect.equals(-1, (0.0).compareTo(499));
- Expect.equals(-1, (0.0).compareTo(inf));
- Expect.equals(-1, (0.0).compareTo(nan));
- Expect.equals(-1, (0.0).compareTo(mnan));
-
- Expect.equals(1, (499.0).compareTo(-inf));
- Expect.equals(1, (499.0).compareTo(-499.0));
- Expect.equals(1, (499.0).compareTo(-499));
- Expect.equals(1, (499.0).compareTo(-0.0));
- Expect.equals(1, (499.0).compareTo(0));
- Expect.equals(1, (499.0).compareTo(0.0));
- Expect.equals(0, (499.0).compareTo(499.0));
- Expect.equals(0, (499.0).compareTo(499));
- Expect.equals(-1, (499.0).compareTo(inf));
- Expect.equals(-1, (499.0).compareTo(nan));
- Expect.equals(-1, (499.0).compareTo(mnan));
-
- Expect.equals(1, (499).compareTo(-inf));
- Expect.equals(1, (499).compareTo(-499.0));
- Expect.equals(1, (499).compareTo(-499));
- Expect.equals(1, (499).compareTo(-0.0));
- Expect.equals(1, (499).compareTo(0));
- Expect.equals(1, (499).compareTo(0.0));
- Expect.equals(0, (499).compareTo(499.0));
- Expect.equals(0, (499).compareTo(499));
- Expect.equals(-1, (499).compareTo(inf));
- Expect.equals(-1, (499).compareTo(nan));
- Expect.equals(-1, (499).compareTo(mnan));
-
- Expect.equals(1, inf.compareTo(-inf));
- Expect.equals(1, inf.compareTo(-499.0));
- Expect.equals(1, inf.compareTo(-499));
- Expect.equals(1, inf.compareTo(-0.0));
- Expect.equals(1, inf.compareTo(0));
- Expect.equals(1, inf.compareTo(0.0));
- Expect.equals(1, inf.compareTo(499.0));
- Expect.equals(1, inf.compareTo(499));
- Expect.equals(0, inf.compareTo(inf));
- Expect.equals(-1, inf.compareTo(nan));
- Expect.equals(-1, inf.compareTo(mnan));
-
- Expect.equals(1, nan.compareTo(-inf));
- Expect.equals(1, nan.compareTo(-499.0));
- Expect.equals(1, nan.compareTo(-499));
- Expect.equals(1, nan.compareTo(-0.0));
- Expect.equals(1, nan.compareTo(0));
- Expect.equals(1, nan.compareTo(0.0));
- Expect.equals(1, nan.compareTo(499.0));
- Expect.equals(1, nan.compareTo(499));
- Expect.equals(1, nan.compareTo(inf));
- Expect.equals(0, nan.compareTo(nan));
- Expect.equals(0, nan.compareTo(mnan));
-}
« no previous file with comments | « tests/corelib_2/data_uri_test.dart ('k') | tests/corelib_strong/const_list_literal_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698