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 // Dart test verifying that the parser does not confuse parameterized types with | 5 // Dart test verifying that the parser does not confuse parameterized types with |
8 // boolean expressions, since both contain '<'. | 6 // boolean expressions, since both contain '<'. |
9 | 7 |
10 class GenericSyntaxTest<B, C, D, E, F> { | 8 class GenericSyntaxTest<B, C, D, E, F> { |
11 GenericSyntaxTest() {} | 9 GenericSyntaxTest() {} |
12 | 10 |
13 void foo(x1, x2, x3, x4, x5) { | 11 void foo(x1, x2, x3, x4, x5) { |
14 Expect.equals(true, x1); | 12 Expect.equals(true, x1); |
15 Expect.equals(3, x2); | 13 Expect.equals(3, x2); |
16 Expect.equals(4, x3); | 14 Expect.equals(4, x3); |
(...skipping 22 matching lines...) Expand all Loading... |
39 new GenericSyntaxTest().test(); | 37 new GenericSyntaxTest().test(); |
40 } | 38 } |
41 } | 39 } |
42 | 40 |
43 abstract class A<B, C, D, E, F> { | 41 abstract class A<B, C, D, E, F> { |
44 } | 42 } |
45 | 43 |
46 main() { | 44 main() { |
47 GenericSyntaxTest.testMain(); | 45 GenericSyntaxTest.testMain(); |
48 } | 46 } |
OLD | NEW |