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 // This test is very long-running and put here first to compile it on its own | 8 // This test is very long-running and put here first to compile it on its own |
9 // in compilation0_test.dart | 9 // in compilation0_test.dart |
10 const Test('Disable tree shaking through reflection', const { | 10 const Test('Disable tree shaking through reflection', const { |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 ''', | 569 ''', |
570 }, preserializedSourceFiles: const { | 570 }, preserializedSourceFiles: const { |
571 'a.dart': ''' | 571 'a.dart': ''' |
572 class C { | 572 class C { |
573 operator ==(other) => () {}; | 573 operator ==(other) => () {}; |
574 } | 574 } |
575 | 575 |
576 test() => new C() == null; | 576 test() => new C() == null; |
577 ''', | 577 ''', |
578 }), | 578 }), |
| 579 |
| 580 const Test('Checked setter', const { |
| 581 'main.dart': ''' |
| 582 import 'a.dart'; |
| 583 |
| 584 main() { |
| 585 test(); |
| 586 } |
| 587 ''', |
| 588 }, preserializedSourceFiles: const { |
| 589 'a.dart': ''' |
| 590 class C { |
| 591 set foo(int i) {} |
| 592 } |
| 593 |
| 594 test() => new C().foo = 0; |
| 595 ''', |
| 596 }, checkedMode: true), |
579 ]; | 597 ]; |
580 | 598 |
581 class Test { | 599 class Test { |
582 final String name; | 600 final String name; |
583 final Map sourceFiles; | 601 final Map sourceFiles; |
584 final Map preserializedSourceFiles; | 602 final Map preserializedSourceFiles; |
585 final Map unserializedSourceFiles; | 603 final Map unserializedSourceFiles; |
586 final int expectedErrorCount; | 604 final int expectedErrorCount; |
587 final int expectedWarningCount; | 605 final int expectedWarningCount; |
588 final int expectedHintCount; | 606 final int expectedHintCount; |
589 final int expectedInfoCount; | 607 final int expectedInfoCount; |
| 608 final bool checkedMode; |
590 | 609 |
591 const Test( | 610 const Test( |
592 this.name, | 611 this.name, |
593 this.sourceFiles, | 612 this.sourceFiles, |
594 {this.preserializedSourceFiles, | 613 {this.preserializedSourceFiles, |
595 this.unserializedSourceFiles, | 614 this.unserializedSourceFiles, |
596 this.expectedErrorCount: 0, | 615 this.expectedErrorCount: 0, |
597 this.expectedWarningCount: 0, | 616 this.expectedWarningCount: 0, |
598 this.expectedHintCount: 0, | 617 this.expectedHintCount: 0, |
599 this.expectedInfoCount: 0}); | 618 this.expectedInfoCount: 0, |
| 619 this.checkedMode: false}); |
600 } | 620 } |
OLD | NEW |