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 // Test is-test of typedefs with optional and named parameters. | 5 // Test is-test of typedefs with optional and named parameters. |
6 | 6 |
7 typedef int Func1(int a); | 7 typedef int Func1(int a); |
8 typedef int Func2(int a, [int b]); | 8 typedef int Func2(int a, [int b]); |
9 typedef int Func3(int a, [int b, int c]); | 9 typedef int Func3(int a, [int b, int c]); |
10 typedef int Func4([int a, int b, int c]); | 10 typedef int Func4([int a, int b, int c]); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 int func5(int i, [int j, int k]) {} | 52 int func5(int i, [int j, int k]) {} |
53 Expect.isTrue(func5 is Func1); | 53 Expect.isTrue(func5 is Func1); |
54 Expect.isTrue(func5 is Func2); | 54 Expect.isTrue(func5 is Func2); |
55 Expect.isTrue(func5 is Func3); | 55 Expect.isTrue(func5 is Func3); |
56 Expect.isFalse(func5 is Func4); | 56 Expect.isFalse(func5 is Func4); |
57 Expect.isFalse(func5 is Func5); | 57 Expect.isFalse(func5 is Func5); |
58 Expect.isFalse(func5 is Func6); | 58 Expect.isFalse(func5 is Func6); |
59 Expect.isFalse(func5 is Func7); | 59 Expect.isFalse(func5 is Func7); |
60 | 60 |
61 int func6([int i, int j, int k]) {} | 61 int func6([int i, int j, int k]) {} |
62 Expect.isFalse(func6 is Func1); | 62 Expect.isTrue(func6 is Func1); |
63 Expect.isFalse(func6 is Func2); | 63 Expect.isTrue(func6 is Func2); |
64 Expect.isFalse(func6 is Func3); | 64 Expect.isTrue(func6 is Func3); |
65 Expect.isTrue(func6 is Func4); | 65 Expect.isTrue(func6 is Func4); |
66 Expect.isFalse(func6 is Func5); | 66 Expect.isFalse(func6 is Func5); |
67 Expect.isFalse(func6 is Func6); | 67 Expect.isFalse(func6 is Func6); |
68 Expect.isFalse(func6 is Func7); | 68 Expect.isFalse(func6 is Func7); |
69 | 69 |
70 int func7(int i, {int j}) {} | 70 int func7(int i, {int j}) {} |
71 Expect.isTrue(func7 is Func1); | 71 Expect.isTrue(func7 is Func1); |
72 Expect.isFalse(func7 is Func2); | 72 Expect.isFalse(func7 is Func2); |
73 Expect.isFalse(func7 is Func3); | 73 Expect.isFalse(func7 is Func3); |
74 Expect.isFalse(func7 is Func4); | 74 Expect.isFalse(func7 is Func4); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 int func12({int c, int a, int b}) {} | 115 int func12({int c, int a, int b}) {} |
116 Expect.isFalse(func12 is Func1); | 116 Expect.isFalse(func12 is Func1); |
117 Expect.isFalse(func12 is Func2); | 117 Expect.isFalse(func12 is Func2); |
118 Expect.isFalse(func12 is Func3); | 118 Expect.isFalse(func12 is Func3); |
119 Expect.isFalse(func12 is Func4); | 119 Expect.isFalse(func12 is Func4); |
120 Expect.isFalse(func12 is Func5); | 120 Expect.isFalse(func12 is Func5); |
121 Expect.isFalse(func12 is Func6); | 121 Expect.isFalse(func12 is Func6); |
122 Expect.isTrue(func12 is Func7); | 122 Expect.isTrue(func12 is Func7); |
123 } | 123 } |
OLD | NEW |