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

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

Issue 2694403003: Add CompilationUnitElement.lineInfo and resynthesize it. (Closed)
Patch Set: Created 3 years, 10 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/lib/src/task/dart.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 fd40ab40929f0eae8292ecd11d69c0ae84c1bf1e..c7eec5d188e64f320a2346bd2efbd59d1853adc2 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -260,6 +260,7 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
compareUriReferencedElements(resynthesized, original, desc);
expect(resynthesized.source, original.source);
expect(resynthesized.librarySource, original.librarySource);
+ compareLineInfo(resynthesized.lineInfo, original.lineInfo);
expect(resynthesized.types.length, original.types.length,
reason: '$desc types');
for (int i = 0; i < resynthesized.types.length; i++) {
@@ -821,6 +822,11 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
compareElements(resynthesized, original, desc);
}
+ void compareLineInfo(LineInfo resynthesized, LineInfo original) {
+ expect(resynthesized.lineCount, original.lineCount);
+ expect(resynthesized.lineStarts, original.lineStarts);
+ }
+
void compareLocalElementsOfExecutable(ExecutableElement resynthesized,
ExecutableElement original, String desc) {
if (original is! Member) {
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698