| OLD | NEW |
| 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 | 4 |
| 5 library iterable_min_max_test; | 5 library iterable_min_max_test; |
| 6 | 6 |
| 7 import "package:expect/expect.dart"; | |
| 8 import "dart:collection"; | 7 import "dart:collection"; |
| 9 | 8 |
| 10 class C { | 9 class C { |
| 11 final x; | 10 final x; |
| 12 const C(this.x); | 11 const C(this.x); |
| 13 int get hashCode => x.hashCode; | 12 int get hashCode => x.hashCode; |
| 14 bool operator==(var other) => other is C && x == other.x; | 13 bool operator==(var other) => other is C && x == other.x; |
| 15 } | 14 } |
| 16 | 15 |
| 17 const inf = double.INFINITY; | 16 const inf = double.INFINITY; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 Expect.equals(const C(10), IterableMixinWorkaround.max(new Set.from(cList), co
mpareC)); | 71 Expect.equals(const C(10), IterableMixinWorkaround.max(new Set.from(cList), co
mpareC)); |
| 73 | 72 |
| 74 bool checkedMode = false; | 73 bool checkedMode = false; |
| 75 assert(checkedMode = true); | 74 assert(checkedMode = true); |
| 76 Expect.throws(cList.min, (e) => checkedMode ? e is TypeError | 75 Expect.throws(cList.min, (e) => checkedMode ? e is TypeError |
| 77 : e is NoSuchMethodError); | 76 : e is NoSuchMethodError); |
| 78 Expect.throws(cList.max, (e) => checkedMode ? e is TypeError | 77 Expect.throws(cList.max, (e) => checkedMode ? e is TypeError |
| 79 : e is NoSuchMethodError); | 78 : e is NoSuchMethodError); |
| 80 } | 79 } |
| 81 | 80 |
| OLD | NEW |