| Index: tests/lib_2/math/min_max_test.dart
|
| diff --git a/tests/lib/math/min_max_test.dart b/tests/lib_2/math/min_max_test.dart
|
| similarity index 96%
|
| rename from tests/lib/math/min_max_test.dart
|
| rename to tests/lib_2/math/min_max_test.dart
|
| index 6cf4dfc32fe3db84b02c4c1a9caf8ea029e4961b..9977797453203ad4f5a9ff9cc6a52acabea64b2e 100644
|
| --- a/tests/lib/math/min_max_test.dart
|
| +++ b/tests/lib_2/math/min_max_test.dart
|
| @@ -13,10 +13,10 @@ var inf = double.INFINITY;
|
| var nan = double.NAN;
|
|
|
| // A class that might work if [min] and [max] worked for non-numbers.
|
| -class Wrap implements Comparable {
|
| - final value;
|
| +class Wrap implements Comparable<dynamic> {
|
| + final num value;
|
| Wrap(this.value);
|
| - int compareTo(Wrap other) => value.compareTo(other.value);
|
| + int compareTo(dynamic other) => value.compareTo(other.value);
|
| bool operator <(Wrap other) => compareTo(other) < 0;
|
| bool operator <=(Wrap other) => compareTo(other) <= 0;
|
| bool operator >(Wrap other) => compareTo(other) > 0;
|
| @@ -33,7 +33,6 @@ testMin() {
|
| testMin1();
|
| testMin2();
|
| testMin3();
|
| - testMinChecks();
|
| }
|
|
|
| testMin1() {
|
| @@ -298,19 +297,10 @@ testMin3() {
|
| Expect.isFalse(min(inf, inf).isNegative);
|
| }
|
|
|
| -testMinChecks() {
|
| - // Min and max work only on numbers.
|
| - // These throw a type assertion or ArgumentError.
|
| - Expect.throws(() => min(wrap1, wrap2));
|
| - Expect.throws(() => min(wrap1, 0));
|
| - Expect.throws(() => min(0, wrap2));
|
| -}
|
| -
|
| testMax() {
|
| testMax1();
|
| testMax2();
|
| testMax3();
|
| - testMaxChecks();
|
| }
|
|
|
| testMax1() {
|
| @@ -565,14 +555,6 @@ testMax3() {
|
| Expect.isTrue(max(-inf, -inf).isNegative);
|
| }
|
|
|
| -testMaxChecks() {
|
| - // Min and max work only on numbers.
|
| - // These throw a type assertion or ArgumentError.
|
| - Expect.throws(() => min(wrap1, wrap2));
|
| - Expect.throws(() => min(wrap1, 0));
|
| - Expect.throws(() => min(0, wrap2));
|
| -}
|
| -
|
| main() {
|
| testMin();
|
| testMin();
|
|
|