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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_common.dart

Issue 2966313002: Remove ExecutableElement.localVariables altogether. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/dart/element/builder_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/resynthesize_common.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index ef645ecd62e596dafd98ed5b638a9c7286262c23..f3b679413ef11a4296aaa2f4a9ce5de636f20e33 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -897,15 +897,6 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
rLabels[i], oLabels[i], '$desc label ${oLabels[i].name}');
}
}
- if (original is! Member) {
- List<LocalVariableElement> rVariables = resynthesized.localVariables;
- List<LocalVariableElement> oVariables = original.localVariables;
- expect(rVariables, hasLength(oVariables.length));
- for (int i = 0; i < oVariables.length; i++) {
- compareVariableElements(rVariables[i], oVariables[i],
- '$desc local variable ${oVariables[i].name}');
- }
- }
}
void compareMetadata(List<ElementAnnotation> resynthesized,
@@ -10607,136 +10598,6 @@ dynamic main() {}
}
}
- test_localVariables_inConstructor() {
- var library = checkLibrary(r'''
-class C {
- C() {
- int v;
- f() {}
- }
-}
-''');
- if (isStrongMode) {
- checkElementText(
- library,
- r'''
-class C {
- C();
-}
-''');
- } else {
- checkElementText(
- library,
- r'''
-class C {
- C();
-}
-''');
- }
- }
-
- test_localVariables_inLocalFunction() {
- var library = checkLibrary(r'''
-f() {
- f1() {
- int v1 = 1;
- } // 2
- f2() {
- int v1 = 1;
- f3() {
- int v2 = 1;
- }
- }
-}
-''');
- if (isStrongMode) {
- checkElementText(
- library,
- r'''
-dynamic f() {}
-''');
- } else {
- checkElementText(
- library,
- r'''
-dynamic f() {}
-''');
- }
- }
-
- test_localVariables_inMethod() {
- var library = checkLibrary(r'''
-class C {
- m() {
- int v;
- }
-}
-''');
- if (isStrongMode) {
- checkElementText(
- library,
- r'''
-class C {
- dynamic m() {}
-}
-''');
- } else {
- checkElementText(
- library,
- r'''
-class C {
- dynamic m() {}
-}
-''');
- }
- }
-
- test_localVariables_inTopLevelFunction() {
- var library = checkLibrary(r'''
-main() {
- int v1 = 1;
- {
- const String v2 = 'bbb';
- }
- Map<int, List<double>> v3;
-}
-''');
- if (isStrongMode) {
- checkElementText(
- library,
- r'''
-dynamic main() {}
-''');
- } else {
- checkElementText(
- library,
- r'''
-dynamic main() {}
-''');
- }
- }
-
- test_localVariables_inTopLevelGetter() {
- var library = checkLibrary(r'''
-get g {
- int v;
-}
-''');
- if (isStrongMode) {
- checkElementText(
- library,
- r'''
-dynamic get g {}
-''');
- } else {
- checkElementText(
- library,
- r'''
-dynamic get g {}
-''');
- }
- }
-
test_main_class() {
var library = checkLibrary('class main {}');
if (isStrongMode) {
« no previous file with comments | « pkg/analyzer/test/dart/element/builder_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698