Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: tests/compiler/dart2js/serialization/test_data.dart

Issue 2194173002: Include constants in deferred computation. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 'main.dart': ''' 636 'main.dart': '''
637 import 'a.dart'; 637 import 'a.dart';
638 638
639 main() {} 639 main() {}
640 ''', 640 ''',
641 }, preserializedSourceFiles: const { 641 }, preserializedSourceFiles: const {
642 'a.dart': ''' 642 'a.dart': '''
643 import 'dart:indexed_db'; 643 import 'dart:indexed_db';
644 ''', 644 ''',
645 }), 645 }),
646
647 const Test('Deferred static access', const {},
648 preserializedSourceFiles: const {
649 'main.dart': '''
650 import 'b.dart' deferred as prefix;
651
652 main() => prefix.loadLibrary().then((_) => prefix.test2());
653 ''',
654 'b.dart': '''
655 test2() => x;
656 var x = const ConstClass(const ConstClass(1));
657 class ConstClass {
658 final x;
659 const ConstClass(this.x);
660 }
661 ''',
662 }),
646 ]; 663 ];
647 664
648 class Test { 665 class Test {
649 final String name; 666 final String name;
650 final Map sourceFiles; 667 final Map sourceFiles;
651 final Map preserializedSourceFiles; 668 final Map preserializedSourceFiles;
652 final Map unserializedSourceFiles; 669 final Map unserializedSourceFiles;
653 final int expectedErrorCount; 670 final int expectedErrorCount;
654 final int expectedWarningCount; 671 final int expectedWarningCount;
655 final int expectedHintCount; 672 final int expectedHintCount;
656 final int expectedInfoCount; 673 final int expectedInfoCount;
657 final bool checkedMode; 674 final bool checkedMode;
658 675
659 const Test( 676 const Test(
660 this.name, 677 this.name,
661 this.sourceFiles, 678 this.sourceFiles,
662 {this.preserializedSourceFiles, 679 {this.preserializedSourceFiles,
663 this.unserializedSourceFiles, 680 this.unserializedSourceFiles,
664 this.expectedErrorCount: 0, 681 this.expectedErrorCount: 0,
665 this.expectedWarningCount: 0, 682 this.expectedWarningCount: 0,
666 this.expectedHintCount: 0, 683 this.expectedHintCount: 0,
667 this.expectedInfoCount: 0, 684 this.expectedInfoCount: 0,
668 this.checkedMode: false}); 685 this.checkedMode: false});
669 } 686 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698