OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 // Dart test program for constructors and initializers. | 4 // Dart test program for constructors and initializers. |
5 | 5 |
6 // Check function subtyping. | 6 // Check function subtyping. |
7 | 7 |
8 import 'package:expect/expect.dart'; | 8 import 'package:expect/expect.dart'; |
9 | 9 |
10 class C<T> {} | 10 class C<T> {} |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // Test ([int,int,int])->void <: (int,[int,int])->void. | 50 // Test ([int,int,int])->void <: (int,[int,int])->void. |
51 Expect.isTrue(new C<void___int_int_int>() is C<void__int__int_int>); | 51 Expect.isTrue(new C<void___int_int_int>() is C<void__int__int_int>); |
52 // Test ([int])->void <: ([double])->void. | 52 // Test ([int])->void <: ([double])->void. |
53 Expect.isFalse(new C<void___int>() is C<void___double>); | 53 Expect.isFalse(new C<void___int>() is C<void___double>); |
54 // Test ([int])->void <: ([int,int])->void. | 54 // Test ([int])->void <: ([int,int])->void. |
55 Expect.isFalse(new C<void___int>() is C<void___int_int>); | 55 Expect.isFalse(new C<void___int>() is C<void___int_int>); |
56 // Test ([int,int])->void <: ([int])->void. | 56 // Test ([int,int])->void <: ([int])->void. |
57 Expect.isTrue(new C<void___int_int>() is C<void___int>); | 57 Expect.isTrue(new C<void___int_int>() is C<void___int>); |
58 // Test ([Object,int])->void <: ([int])->void. | 58 // Test ([Object,int])->void <: ([int])->void. |
59 Expect.isTrue(new C<void___Object_int>() is C<void___int>); | 59 Expect.isTrue(new C<void___Object_int>() is C<void___int>); |
60 } | 60 } |
OLD | NEW |