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

Side by Side Diff: pkg/analyzer/test/src/summary/resynthesize_test.dart

Issue 2030403002: Resynthesize constructors lazily. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 test.src.serialization.elements_test; 5 library test.src.serialization.elements_test;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/constant/value.dart'; 10 import 'package:analyzer/dart/constant/value.dart';
(...skipping 3637 matching lines...) Expand 10 before | Expand all | Expand 10 after
3648 get g { 3648 get g {
3649 f() {} 3649 f() {}
3650 } 3650 }
3651 '''); 3651 ''');
3652 } 3652 }
3653 3653
3654 test_localLabels_inConstructor() { 3654 test_localLabels_inConstructor() {
3655 checkLibrary(r''' 3655 checkLibrary(r'''
3656 class C { 3656 class C {
3657 C() { 3657 C() {
3658 aaa: while (true) {} 3658 aaa: print(0);
3659 bbb: switch (42) { 3659 bbb: switch (42) {
3660 ccc: case 0: 3660 ccc: case 0:
3661 break; 3661 break;
3662 } 3662 }
3663 } 3663 }
3664 } 3664 }
3665 '''); 3665 ''');
3666 } 3666 }
3667 3667
3668 test_localLabels_inMethod() { 3668 test_localLabels_inMethod() {
3669 checkLibrary(r''' 3669 checkLibrary(r'''
3670 class C { 3670 class C {
3671 m() { 3671 m() {
3672 aaa: while (true) {} 3672 aaa: print(0);
3673 bbb: switch (42) { 3673 bbb: switch (42) {
3674 ccc: case 0: 3674 ccc: case 0:
3675 break; 3675 break;
3676 } 3676 }
3677 } 3677 }
3678 } 3678 }
3679 '''); 3679 ''');
3680 } 3680 }
3681 3681
3682 test_localLabels_inTopLevelFunction() { 3682 test_localLabels_inTopLevelFunction() {
3683 checkLibrary(r''' 3683 checkLibrary(r'''
3684 main() { 3684 main() {
3685 aaa: while (true) {} 3685 aaa: print(0);
3686 bbb: switch (42) { 3686 bbb: switch (42) {
3687 ccc: case 0: 3687 ccc: case 0:
3688 break; 3688 break;
3689 } 3689 }
3690 } 3690 }
3691 '''); 3691 ''');
3692 } 3692 }
3693 3693
3694 test_localVariables_inConstructor() { 3694 test_localVariables_inConstructor() {
3695 checkLibrary(r''' 3695 checkLibrary(r'''
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
4602 fail('Unexpectedly tried to get unlinked summary for $uri'); 4602 fail('Unexpectedly tried to get unlinked summary for $uri');
4603 } 4603 }
4604 return serializedUnit; 4604 return serializedUnit;
4605 } 4605 }
4606 4606
4607 @override 4607 @override
4608 bool hasLibrarySummary(String uri) { 4608 bool hasLibrarySummary(String uri) {
4609 return true; 4609 return true;
4610 } 4610 }
4611 } 4611 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698