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 |
5 // Test is-test of typedefs with optional and named parameters. | 7 // Test is-test of typedefs with optional and named parameters. |
6 | 8 |
7 typedef int Func1(int a); | 9 typedef int Func1(int a); |
8 typedef int Func2(int a, [int b]); | 10 typedef int Func2(int a, [int b]); |
9 typedef int Func3(int a, [int b, int c]); | 11 typedef int Func3(int a, [int b, int c]); |
10 typedef int Func4([int a, int b, int c]); | 12 typedef int Func4([int a, int b, int c]); |
11 typedef int Func5(int a, {int b}); | 13 typedef int Func5(int a, {int b}); |
12 typedef int Func6(int a, {int b, int c}); | 14 typedef int Func6(int a, {int b, int c}); |
13 typedef int Func7({int a, int b, int c}); | 15 typedef int Func7({int a, int b, int c}); |
14 | 16 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 116 |
115 int func12({int c, int a, int b}) {} | 117 int func12({int c, int a, int b}) {} |
116 Expect.isFalse(func12 is Func1); | 118 Expect.isFalse(func12 is Func1); |
117 Expect.isFalse(func12 is Func2); | 119 Expect.isFalse(func12 is Func2); |
118 Expect.isFalse(func12 is Func3); | 120 Expect.isFalse(func12 is Func3); |
119 Expect.isFalse(func12 is Func4); | 121 Expect.isFalse(func12 is Func4); |
120 Expect.isFalse(func12 is Func5); | 122 Expect.isFalse(func12 is Func5); |
121 Expect.isFalse(func12 is Func6); | 123 Expect.isFalse(func12 is Func6); |
122 Expect.isTrue(func12 is Func7); | 124 Expect.isTrue(func12 is Func7); |
123 } | 125 } |
OLD | NEW |