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

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

Issue 2003733003: Resynthesize most of the ImportElementImpl lazily. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 fail('Type mismatch: expected ${original.runtimeType},' 1075 fail('Type mismatch: expected ${original.runtimeType},'
1076 ' got ${resynthesized.runtimeType} ($desc)'); 1076 ' got ${resynthesized.runtimeType} ($desc)');
1077 } else { 1077 } else {
1078 fail('Unimplemented comparison for ${original.runtimeType}'); 1078 fail('Unimplemented comparison for ${original.runtimeType}');
1079 } 1079 }
1080 } 1080 }
1081 1081
1082 void compareUriReferencedElements(UriReferencedElementImpl resynthesized, 1082 void compareUriReferencedElements(UriReferencedElementImpl resynthesized,
1083 UriReferencedElementImpl original, String desc) { 1083 UriReferencedElementImpl original, String desc) {
1084 compareElements(resynthesized, original, desc); 1084 compareElements(resynthesized, original, desc);
1085 expect(resynthesized.uri, original.uri); 1085 expect(resynthesized.uri, original.uri, reason: '$desc uri');
1086 expect(resynthesized.uriOffset, original.uriOffset, reason: desc); 1086 expect(resynthesized.uriOffset, original.uriOffset,
1087 expect(resynthesized.uriEnd, original.uriEnd, reason: desc); 1087 reason: '$desc uri uriOffset');
1088 expect(resynthesized.uriEnd, original.uriEnd, reason: '$desc uriEnd');
1088 } 1089 }
1089 1090
1090 void compareVariableElements( 1091 void compareVariableElements(
1091 VariableElement resynthesized, VariableElement original, String desc) { 1092 VariableElement resynthesized, VariableElement original, String desc) {
1092 compareElements(resynthesized, original, desc); 1093 compareElements(resynthesized, original, desc);
1093 compareTypes(resynthesized.type, original.type, desc); 1094 compareTypes(resynthesized.type, original.type, desc);
1094 VariableElementImpl resynthesizedActual = 1095 VariableElementImpl resynthesizedActual =
1095 getActualElement(resynthesized, desc); 1096 getActualElement(resynthesized, desc);
1096 VariableElementImpl originalActual = getActualElement(original, desc); 1097 VariableElementImpl originalActual = getActualElement(original, desc);
1097 if (!skipBrokenAstInference) { 1098 if (!skipBrokenAstInference) {
(...skipping 3500 matching lines...) Expand 10 before | Expand all | Expand 10 after
4598 fail('Unexpectedly tried to get unlinked summary for $uri'); 4599 fail('Unexpectedly tried to get unlinked summary for $uri');
4599 } 4600 }
4600 return serializedUnit; 4601 return serializedUnit;
4601 } 4602 }
4602 4603
4603 @override 4604 @override
4604 bool hasLibrarySummary(String uri) { 4605 bool hasLibrarySummary(String uri) {
4605 return true; 4606 return true;
4606 } 4607 }
4607 } 4608 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698