| 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 import "package:expect/expect.dart"; | |
| 6 | |
| 7 check(value, expectComparable, expectPattern) { | 5 check(value, expectComparable, expectPattern) { |
| 8 Expect.equals(expectComparable, value is Comparable); | 6 Expect.equals(expectComparable, value is Comparable); |
| 9 Expect.equals(expectPattern, value is Pattern); | 7 Expect.equals(expectPattern, value is Pattern); |
| 10 } | 8 } |
| 11 | 9 |
| 12 int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); | 10 int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); |
| 13 | 11 |
| 14 class A implements Comparable { | 12 class A implements Comparable { |
| 15 } | 13 } |
| 16 | 14 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 30 check(things[inscrutable(0)], false, false); // List | 28 check(things[inscrutable(0)], false, false); // List |
| 31 check(things[inscrutable(1)], true, false); // int | 29 check(things[inscrutable(1)], true, false); // int |
| 32 check(things[inscrutable(2)], true, false); // num | 30 check(things[inscrutable(2)], true, false); // num |
| 33 check(things[inscrutable(3)], true, true); // string | 31 check(things[inscrutable(3)], true, true); // string |
| 34 check(things[inscrutable(4)], false, false); // Object | 32 check(things[inscrutable(4)], false, false); // Object |
| 35 check(things[inscrutable(5)], true, false); // A | 33 check(things[inscrutable(5)], true, false); // A |
| 36 check(things[inscrutable(6)], false, false); // B | 34 check(things[inscrutable(6)], false, false); // B |
| 37 check(things[inscrutable(7)], false, true); // C | 35 check(things[inscrutable(7)], false, true); // C |
| 38 check(things[inscrutable(8)], true, true); // D | 36 check(things[inscrutable(8)], true, true); // D |
| 39 } | 37 } |
| OLD | NEW |