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

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

Issue 2223113002: Add line starts into unlinked units. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: tweaks Created 4 years, 4 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
Index: pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
index cb6cfeb2ec1f3383c446e0e09543cfc5583efae2..62a5bea0131c9b24dc1a064499c9471d2b09ec37 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
@@ -20,6 +20,7 @@ import 'package:analyzer/src/summary/summarize_ast.dart';
import 'package:analyzer/src/summary/summarize_elements.dart'
show PackageBundleAssembler;
import 'package:analyzer/task/dart.dart' show PARSED_UNIT;
+import 'package:analyzer/task/general.dart';
import 'package:unittest/unittest.dart';
import '../../reflective_tests.dart';
@@ -791,7 +792,9 @@ abstract class _AstResynthesizeTestMixin {
}
return uriToUnit.putIfAbsent(uriStr, () {
CompilationUnit unit = context.computeResult(source, PARSED_UNIT);
- UnlinkedUnitBuilder unlinkedUnit = serializeAstUnlinked(unit);
+ LineInfo lineInfo = context.computeResult(source, LINE_INFO);
+ UnlinkedUnitBuilder unlinkedUnit =
+ serializeAstUnlinked(unit, lineInfo.lineStarts);
bundleAssembler.addUnlinkedUnit(source, unlinkedUnit);
return unlinkedUnit;
});

Powered by Google App Engine
This is Rietveld 408576698