| 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 native "*A" { | 12 class A native "*A" { |
| 15 } | 13 } |
| 16 | 14 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 47 check(things[inscrutable(0)], false, false); // List | 45 check(things[inscrutable(0)], false, false); // List |
| 48 check(things[inscrutable(1)], true, false); // int | 46 check(things[inscrutable(1)], true, false); // int |
| 49 check(things[inscrutable(2)], true, false); // num | 47 check(things[inscrutable(2)], true, false); // num |
| 50 check(things[inscrutable(3)], true, true); // string | 48 check(things[inscrutable(3)], true, true); // string |
| 51 check(things[inscrutable(4)], false, false); // Object | 49 check(things[inscrutable(4)], false, false); // Object |
| 52 check(things[inscrutable(5)], false, false); // A | 50 check(things[inscrutable(5)], false, false); // A |
| 53 check(things[inscrutable(6)], true, false); // B | 51 check(things[inscrutable(6)], true, false); // B |
| 54 check(things[inscrutable(7)], false, true); // C | 52 check(things[inscrutable(7)], false, true); // C |
| 55 check(things[inscrutable(8)], true, true); // D | 53 check(things[inscrutable(8)], true, true); // D |
| 56 } | 54 } |
| OLD | NEW |