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('Empty program', const { | 8 const Test('Empty program', const { |
9 'main.dart': 'main() {}' | 9 'main.dart': 'main() {}' |
10 }), | 10 }), |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 } | 395 } |
396 ''', | 396 ''', |
397 }, preserializedSourceFiles: const { | 397 }, preserializedSourceFiles: const { |
398 'a.dart': ''' | 398 'a.dart': ''' |
399 class A { | 399 class A { |
400 noSuchMethod(_) => null; | 400 noSuchMethod(_) => null; |
401 m(); | 401 m(); |
402 } | 402 } |
403 ''', | 403 ''', |
404 }), | 404 }), |
| 405 |
| 406 const Test('Malformed types', const { |
| 407 'main.dart': ''' |
| 408 import 'a.dart'; |
| 409 |
| 410 main() { |
| 411 m(); |
| 412 } |
| 413 ''', |
| 414 }, preserializedSourceFiles: const { |
| 415 'a.dart': ''' |
| 416 Unresolved m() {} |
| 417 ''', |
| 418 }), |
405 ]; | 419 ]; |
406 | 420 |
407 class Test { | 421 class Test { |
408 final String name; | 422 final String name; |
409 final Map sourceFiles; | 423 final Map sourceFiles; |
410 final Map preserializedSourceFiles; | 424 final Map preserializedSourceFiles; |
411 final Map unserializedSourceFiles; | 425 final Map unserializedSourceFiles; |
412 final int expectedErrorCount; | 426 final int expectedErrorCount; |
413 final int expectedWarningCount; | 427 final int expectedWarningCount; |
414 final int expectedHintCount; | 428 final int expectedHintCount; |
415 final int expectedInfoCount; | 429 final int expectedInfoCount; |
416 | 430 |
417 const Test( | 431 const Test( |
418 this.name, | 432 this.name, |
419 this.sourceFiles, | 433 this.sourceFiles, |
420 {this.preserializedSourceFiles, | 434 {this.preserializedSourceFiles, |
421 this.unserializedSourceFiles, | 435 this.unserializedSourceFiles, |
422 this.expectedErrorCount: 0, | 436 this.expectedErrorCount: 0, |
423 this.expectedWarningCount: 0, | 437 this.expectedWarningCount: 0, |
424 this.expectedHintCount: 0, | 438 this.expectedHintCount: 0, |
425 this.expectedInfoCount: 0}); | 439 this.expectedInfoCount: 0}); |
426 } | 440 } |
OLD | NEW |