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

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

Issue 2150533002: Serialize data for LibraryElement.getImportsFor (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 ''', 587 ''',
588 }, preserializedSourceFiles: const { 588 }, preserializedSourceFiles: const {
589 'a.dart': ''' 589 'a.dart': '''
590 class C { 590 class C {
591 set foo(int i) {} 591 set foo(int i) {}
592 } 592 }
593 593
594 test() => new C().foo = 0; 594 test() => new C().foo = 0;
595 ''', 595 ''',
596 }, checkedMode: true), 596 }, checkedMode: true),
597
598 const Test('Deferred access', const {
599 'main.dart': '''
600 import 'a.dart';
601
602 main() {
603 test();
604 }
605 ''',
606 }, preserializedSourceFiles: const {
607 'a.dart': '''
608 import 'b.dart' deferred as b;
609
610 test() => b.loadLibrary().then((_) => b.test2());
611 ''',
612 'b.dart': '''
613 test2() {}
614 ''',
615 }),
616
617 const Test('Deferred access of dart:core', const {
618 'main.dart': '''
619 import 'a.dart';
620
621 main() {
622 test();
623 }
624 ''',
625 }, preserializedSourceFiles: const {
626 'a.dart': '''
627 import "dart:core" deferred as core;
628
629 test() {
630 core.loadLibrary().then((_) => null);
631 }
632 ''',
633 }),
597 ]; 634 ];
598 635
599 class Test { 636 class Test {
600 final String name; 637 final String name;
601 final Map sourceFiles; 638 final Map sourceFiles;
602 final Map preserializedSourceFiles; 639 final Map preserializedSourceFiles;
603 final Map unserializedSourceFiles; 640 final Map unserializedSourceFiles;
604 final int expectedErrorCount; 641 final int expectedErrorCount;
605 final int expectedWarningCount; 642 final int expectedWarningCount;
606 final int expectedHintCount; 643 final int expectedHintCount;
607 final int expectedInfoCount; 644 final int expectedInfoCount;
608 final bool checkedMode; 645 final bool checkedMode;
609 646
610 const Test( 647 const Test(
611 this.name, 648 this.name,
612 this.sourceFiles, 649 this.sourceFiles,
613 {this.preserializedSourceFiles, 650 {this.preserializedSourceFiles,
614 this.unserializedSourceFiles, 651 this.unserializedSourceFiles,
615 this.expectedErrorCount: 0, 652 this.expectedErrorCount: 0,
616 this.expectedWarningCount: 0, 653 this.expectedWarningCount: 0,
617 this.expectedHintCount: 0, 654 this.expectedHintCount: 0,
618 this.expectedInfoCount: 0, 655 this.expectedInfoCount: 0,
619 this.checkedMode: false}); 656 this.checkedMode: false});
620 } 657 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698