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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 'main.dart': ''' | 459 'main.dart': ''' |
460 import 'a.dart'; | 460 import 'a.dart'; |
461 | 461 |
462 main() => m(null, null, null); | 462 main() => m(null, null, null); |
463 ''', | 463 ''', |
464 }, preserializedSourceFiles: const { | 464 }, preserializedSourceFiles: const { |
465 'a.dart': ''' | 465 'a.dart': ''' |
466 m(a, b, c) => a[b] ??= c; | 466 m(a, b, c) => a[b] ??= c; |
467 ''', | 467 ''', |
468 }), | 468 }), |
| 469 |
| 470 const Test('Forwarding constructor defined by forwarding constructor', const { |
| 471 'main.dart': ''' |
| 472 import 'a.dart'; |
| 473 |
| 474 main() => new C(); |
| 475 ''', |
| 476 }, preserializedSourceFiles: const { |
| 477 'a.dart': ''' |
| 478 class A {} |
| 479 class B {} |
| 480 class C {} |
| 481 class D = A with B, C; |
| 482 ''', |
| 483 }), |
469 ]; | 484 ]; |
470 | 485 |
471 class Test { | 486 class Test { |
472 final String name; | 487 final String name; |
473 final Map sourceFiles; | 488 final Map sourceFiles; |
474 final Map preserializedSourceFiles; | 489 final Map preserializedSourceFiles; |
475 final Map unserializedSourceFiles; | 490 final Map unserializedSourceFiles; |
476 final int expectedErrorCount; | 491 final int expectedErrorCount; |
477 final int expectedWarningCount; | 492 final int expectedWarningCount; |
478 final int expectedHintCount; | 493 final int expectedHintCount; |
479 final int expectedInfoCount; | 494 final int expectedInfoCount; |
480 | 495 |
481 const Test( | 496 const Test( |
482 this.name, | 497 this.name, |
483 this.sourceFiles, | 498 this.sourceFiles, |
484 {this.preserializedSourceFiles, | 499 {this.preserializedSourceFiles, |
485 this.unserializedSourceFiles, | 500 this.unserializedSourceFiles, |
486 this.expectedErrorCount: 0, | 501 this.expectedErrorCount: 0, |
487 this.expectedWarningCount: 0, | 502 this.expectedWarningCount: 0, |
488 this.expectedHintCount: 0, | 503 this.expectedHintCount: 0, |
489 this.expectedInfoCount: 0}); | 504 this.expectedInfoCount: 0}); |
490 } | 505 } |
OLD | NEW |