| 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 class C<T> { | 5 class C<T> { |
| 8 final T t; | 6 final T t; |
| 9 const C(this.t); | 7 const C(this.t); |
| 10 } | 8 } |
| 11 | 9 |
| 12 typedef int Fun(bool, String); | 10 typedef int Fun(bool, String); |
| 13 | 11 |
| 14 const c0 = C; | 12 const c0 = C; |
| 15 const c1 = const C(C); | 13 const c1 = const C(C); |
| 16 const c2 = Fun; | 14 const c2 = Fun; |
| 17 const c3 = const C(Fun); | 15 const c3 = const C(Fun); |
| 18 | 16 |
| 19 main() { | 17 main() { |
| 20 Expect.identical(C, C); | 18 Expect.identical(C, C); |
| 21 Expect.identical(C, c0); | 19 Expect.identical(C, c0); |
| 22 Expect.identical(c1, c1); | 20 Expect.identical(c1, c1); |
| 23 Expect.notEquals(c0, c1); | 21 Expect.notEquals(c0, c1); |
| 24 Expect.notEquals(c1, c2); | 22 Expect.notEquals(c1, c2); |
| 25 Expect.identical(c1.t, c0); | 23 Expect.identical(c1.t, c0); |
| 26 Expect.notEquals(C, Fun); | 24 Expect.notEquals(C, Fun); |
| 27 Expect.identical(Fun, Fun); | 25 Expect.identical(Fun, Fun); |
| 28 Expect.identical(Fun, c2); | 26 Expect.identical(Fun, c2); |
| 29 Expect.identical(c3.t, c2); | 27 Expect.identical(c3.t, c2); |
| 30 } | 28 } |
| OLD | NEW |