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

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

Issue 1576663002: Use FlatBuffers for summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/summary_test.dart
diff --git a/pkg/analyzer/test/src/summary/summary_test.dart b/pkg/analyzer/test/src/summary/summary_test.dart
index 7d9bb94bbd19a533697a4ace5ffa61f3a40190da..349d75e457b82ff3b0151e68a35461e4f3f6525f 100644
--- a/pkg/analyzer/test/src/summary/summary_test.dart
+++ b/pkg/analyzer/test/src/summary/summary_test.dart
@@ -98,12 +98,14 @@ class SummarizeElementsTest extends ResolverTestCase with SummaryTest {
summarize_elements.LibrarySerializationResult serializedLib =
summarize_elements.serializeLibrary(
builderContext, library, typeProvider);
- prelinked =
- new PrelinkedLibrary.fromBuffer(serializedLib.prelinked.toBuffer());
- unlinkedUnits = serializedLib.unlinkedUnits
- .map((UnlinkedUnitBuilder b) =>
- new UnlinkedUnit.fromBuffer(b.toBuffer()))
- .toList();
+ {
+ List<int> buffer = serializedLib.prelinked.toBuffer();
+ prelinked = new PrelinkedLibrary.fromBuffer(buffer);
+ }
+ unlinkedUnits = serializedLib.unlinkedUnits.map((UnlinkedUnitBuilder b) {
+ List<int> buffer = b.toBuffer();
+ return new UnlinkedUnit.fromBuffer(buffer);
+ }).toList();
unitUris = serializedLib.unitUris;
}
@@ -595,7 +597,8 @@ enum E {
UnlinkedTypeRef serializeTypeText(String text,
{String otherDeclarations: '', bool allowErrors: false}) {
return serializeVariableText('$otherDeclarations\n$text v;',
- allowErrors: allowErrors).type;
+ allowErrors: allowErrors)
+ .type;
}
/**
@@ -1622,7 +1625,8 @@ enum E { v }''';
test_executable_operator_index_set() {
UnlinkedExecutable executable = serializeClassText(
- 'class C { void operator[]=(int i, bool v) => null; }').executables[0];
+ 'class C { void operator[]=(int i, bool v) => null; }')
+ .executables[0];
expect(executable.kind, UnlinkedExecutableKind.functionOrMethod);
expect(executable.name, '[]=');
expect(executable.hasImplicitReturnType, false);

Powered by Google App Engine
This is Rietveld 408576698