OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 library dart2js.serialization_test_data; | 5 library dart2js.serialization_test_data; |
6 | 6 |
7 const List<Test> TESTS = const <Test>[ | 7 const List<Test> TESTS = const <Test>[ |
8 const Test(const { | 8 const Test(const { |
9 'main.dart': 'main() {}' | 9 'main.dart': 'main() {}' |
10 }), | 10 }), |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 } | 181 } |
182 main() { | 182 main() { |
183 // Invocation of `MyRandom.nextInt` is only detected knowing the actual | 183 // Invocation of `MyRandom.nextInt` is only detected knowing the actual |
184 // implementation class for `List` and the world impact of its `shuffle` | 184 // implementation class for `List` and the world impact of its `shuffle` |
185 // method. | 185 // method. |
186 [].shuffle(new MyRandom()); | 186 [].shuffle(new MyRandom()); |
187 }''' | 187 }''' |
188 }, | 188 }, |
189 expectedWarningCount: 1, | 189 expectedWarningCount: 1, |
190 expectedInfoCount: 0), | 190 expectedInfoCount: 0), |
| 191 |
| 192 const Test(const { |
| 193 'main.dart': ''' |
| 194 main() { |
| 195 loop: for (var a in []) { |
| 196 for (var b in []) { |
| 197 continue loop; |
| 198 } |
| 199 break; |
| 200 } |
| 201 }''' |
| 202 }), |
| 203 |
191 ]; | 204 ]; |
192 | 205 |
193 class Test { | 206 class Test { |
194 final Map sourceFiles; | 207 final Map sourceFiles; |
195 final int expectedErrorCount; | 208 final int expectedErrorCount; |
196 final int expectedWarningCount; | 209 final int expectedWarningCount; |
197 final int expectedHintCount; | 210 final int expectedHintCount; |
198 final int expectedInfoCount; | 211 final int expectedInfoCount; |
199 | 212 |
200 const Test(this.sourceFiles, { | 213 const Test(this.sourceFiles, { |
201 this.expectedErrorCount: 0, | 214 this.expectedErrorCount: 0, |
202 this.expectedWarningCount: 0, | 215 this.expectedWarningCount: 0, |
203 this.expectedHintCount: 0, | 216 this.expectedHintCount: 0, |
204 this.expectedInfoCount: 0}); | 217 this.expectedInfoCount: 0}); |
205 } | 218 } |
OLD | NEW |