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

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: Rebased 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 // These tests are very long-running and put here first to compile them on 8 // These tests are very long-running and put here first to compile them on
9 // their own tests. 9 // their own tests.
10 const Test('Disable tree shaking through reflection', const { 10 const Test('Disable tree shaking through reflection', const {
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 ''', 637 ''',
638 }, preserializedSourceFiles: const { 638 }, preserializedSourceFiles: const {
639 'a.dart': ''' 639 'a.dart': '''
640 import "dart:core" deferred as core; 640 import "dart:core" deferred as core;
641 641
642 test() { 642 test() {
643 core.loadLibrary().then((_) => null); 643 core.loadLibrary().then((_) => null);
644 } 644 }
645 ''', 645 ''',
646 }), 646 }),
647
648 const Test('Use of dart:indexed_db', const {
649 'main.dart': '''
650 import 'a.dart';
651
652 main() {}
653 ''',
654 }, preserializedSourceFiles: const {
655 'a.dart': '''
656 import 'dart:indexed_db';
657 ''',
658 }),
659
660 const Test('Deferred static access', const {},
661 preserializedSourceFiles: const {
662 'main.dart': '''
663 import 'b.dart' deferred as prefix;
664
665 main() => prefix.loadLibrary().then((_) => prefix.test2());
666 ''',
667 'b.dart': '''
668 test2() => x;
669 var x = const ConstClass(const ConstClass(1));
670 class ConstClass {
671 final x;
672 const ConstClass(this.x);
673 }
674 ''',
675 }),
647 ]; 676 ];
648 677
649 class Test { 678 class Test {
650 final String name; 679 final String name;
651 final Map sourceFiles; 680 final Map sourceFiles;
652 final Map preserializedSourceFiles; 681 final Map preserializedSourceFiles;
653 final Map unserializedSourceFiles; 682 final Map unserializedSourceFiles;
654 final int expectedErrorCount; 683 final int expectedErrorCount;
655 final int expectedWarningCount; 684 final int expectedWarningCount;
656 final int expectedHintCount; 685 final int expectedHintCount;
657 final int expectedInfoCount; 686 final int expectedInfoCount;
658 final bool checkedMode; 687 final bool checkedMode;
659 688
660 const Test( 689 const Test(
661 this.name, 690 this.name,
662 this.sourceFiles, 691 this.sourceFiles,
663 {this.preserializedSourceFiles, 692 {this.preserializedSourceFiles,
664 this.unserializedSourceFiles, 693 this.unserializedSourceFiles,
665 this.expectedErrorCount: 0, 694 this.expectedErrorCount: 0,
666 this.expectedWarningCount: 0, 695 this.expectedWarningCount: 0,
667 this.expectedHintCount: 0, 696 this.expectedHintCount: 0,
668 this.expectedInfoCount: 0, 697 this.expectedInfoCount: 0,
669 this.checkedMode: false}); 698 this.checkedMode: false});
670 } 699 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/serialization/model_test_helper.dart ('k') | tests/compiler/dart2js/serialization/test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698