OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 | 4 |
5 import 'package:expect/expect.dart'; | 5 import 'package:expect/expect.dart'; |
6 | 6 |
7 main() { | 7 main() { |
8 Expect.equals(0.0, 0.0.ceilToDouble()); | 8 Expect.equals(0.0, 0.0.ceilToDouble()); |
9 Expect.equals(1.0, double.MIN_POSITIVE.ceilToDouble()); | 9 Expect.equals(1.0, double.MIN_POSITIVE.ceilToDouble()); |
10 Expect.equals(1.0, (2.0 * double.MIN_POSITIVE).ceilToDouble()); | 10 Expect.equals(1.0, (2.0 * double.MIN_POSITIVE).ceilToDouble()); |
(...skipping 26 matching lines...) Expand all Loading... |
37 Expect.equals(-1.0, (-1.000000000000001).ceilToDouble()); | 37 Expect.equals(-1.0, (-1.000000000000001).ceilToDouble()); |
38 Expect.equals(-4503599627370496.0, (-4503599627370496.0).ceilToDouble()); | 38 Expect.equals(-4503599627370496.0, (-4503599627370496.0).ceilToDouble()); |
39 Expect.equals(-4503599627370497.0, (-4503599627370497.0).ceilToDouble()); | 39 Expect.equals(-4503599627370497.0, (-4503599627370497.0).ceilToDouble()); |
40 Expect.equals(-4503599627370498.0, (-4503599627370498.0).ceilToDouble()); | 40 Expect.equals(-4503599627370498.0, (-4503599627370498.0).ceilToDouble()); |
41 Expect.equals(-4503599627370499.0, (-4503599627370499.0).ceilToDouble()); | 41 Expect.equals(-4503599627370499.0, (-4503599627370499.0).ceilToDouble()); |
42 Expect.equals(-9007199254740991.0, (-9007199254740991.0).ceilToDouble()); | 42 Expect.equals(-9007199254740991.0, (-9007199254740991.0).ceilToDouble()); |
43 Expect.equals(-9007199254740992.0, (-9007199254740992.0).ceilToDouble()); | 43 Expect.equals(-9007199254740992.0, (-9007199254740992.0).ceilToDouble()); |
44 Expect.equals(-double.MAX_FINITE, (-double.MAX_FINITE).ceilToDouble()); | 44 Expect.equals(-double.MAX_FINITE, (-double.MAX_FINITE).ceilToDouble()); |
45 | 45 |
46 Expect.equals(double.INFINITY, double.INFINITY.ceilToDouble()); | 46 Expect.equals(double.INFINITY, double.INFINITY.ceilToDouble()); |
47 Expect.equals(double.NEGATIVE_INFINITY, | 47 Expect.equals( |
48 double.NEGATIVE_INFINITY.ceilToDouble()); | 48 double.NEGATIVE_INFINITY, double.NEGATIVE_INFINITY.ceilToDouble()); |
49 Expect.isTrue(double.NAN.ceilToDouble().isNaN); | 49 Expect.isTrue(double.NAN.ceilToDouble().isNaN); |
50 | 50 |
51 Expect.isTrue(0.0.ceilToDouble() is double); | 51 Expect.isTrue(0.0.ceilToDouble() is double); |
52 Expect.isTrue(double.MIN_POSITIVE.ceilToDouble() is double); | 52 Expect.isTrue(double.MIN_POSITIVE.ceilToDouble() is double); |
53 Expect.isTrue((2.0 * double.MIN_POSITIVE).ceilToDouble() is double); | 53 Expect.isTrue((2.0 * double.MIN_POSITIVE).ceilToDouble() is double); |
54 Expect.isTrue((1.18e-38).ceilToDouble() is double); | 54 Expect.isTrue((1.18e-38).ceilToDouble() is double); |
55 Expect.isTrue((1.18e-38 * 2).ceilToDouble() is double); | 55 Expect.isTrue((1.18e-38 * 2).ceilToDouble() is double); |
56 Expect.isTrue(0.49999999999999994.ceilToDouble() is double); | 56 Expect.isTrue(0.49999999999999994.ceilToDouble() is double); |
57 Expect.isTrue(0.5.ceilToDouble() is double); | 57 Expect.isTrue(0.5.ceilToDouble() is double); |
58 Expect.isTrue(0.9999999999999999.ceilToDouble() is double); | 58 Expect.isTrue(0.9999999999999999.ceilToDouble() is double); |
(...skipping 24 matching lines...) Expand all Loading... |
83 Expect.isTrue((-0.9999999999999999).ceilToDouble() is double); | 83 Expect.isTrue((-0.9999999999999999).ceilToDouble() is double); |
84 Expect.isTrue((-1.0).ceilToDouble() is double); | 84 Expect.isTrue((-1.0).ceilToDouble() is double); |
85 Expect.isTrue((-1.000000000000001).ceilToDouble() is double); | 85 Expect.isTrue((-1.000000000000001).ceilToDouble() is double); |
86 Expect.isTrue((-4503599627370496.0).ceilToDouble() is double); | 86 Expect.isTrue((-4503599627370496.0).ceilToDouble() is double); |
87 Expect.isTrue((-4503599627370497.0).ceilToDouble() is double); | 87 Expect.isTrue((-4503599627370497.0).ceilToDouble() is double); |
88 Expect.isTrue((-4503599627370498.0).ceilToDouble() is double); | 88 Expect.isTrue((-4503599627370498.0).ceilToDouble() is double); |
89 Expect.isTrue((-4503599627370499.0).ceilToDouble() is double); | 89 Expect.isTrue((-4503599627370499.0).ceilToDouble() is double); |
90 Expect.isTrue((-9007199254740991.0).ceilToDouble() is double); | 90 Expect.isTrue((-9007199254740991.0).ceilToDouble() is double); |
91 Expect.isTrue((-9007199254740992.0).ceilToDouble() is double); | 91 Expect.isTrue((-9007199254740992.0).ceilToDouble() is double); |
92 Expect.isTrue((-double.MAX_FINITE).ceilToDouble() is double); | 92 Expect.isTrue((-double.MAX_FINITE).ceilToDouble() is double); |
93 } | 93 } |
OLD | NEW |