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