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

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

Issue 1792523002: Use specialized _FbUint8List and Uint8ListReader. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/summary/flat_buffers.dart ('k') | pkg/analyzer/tool/summary/build_sdk_summaries.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/flat_buffers_test.dart
diff --git a/pkg/analyzer/test/src/summary/flat_buffers_test.dart b/pkg/analyzer/test/src/summary/flat_buffers_test.dart
index 076df23fa0fa88230ce3f745289ca63358fb67c0..b17dc1442eebed773027a3c6798d178b55afcadb 100644
--- a/pkg/analyzer/test/src/summary/flat_buffers_test.dart
+++ b/pkg/analyzer/test/src/summary/flat_buffers_test.dart
@@ -345,7 +345,7 @@ class BuilderTest {
}
// read and verify
BufferPointer root = new BufferPointer.fromBytes(byteList);
- List<int> items = const ListReader<int>(const Uint32Reader()).read(root);
+ List<int> items = const Uint32ListReader().read(root);
expect(items, hasLength(3));
expect(items, orderedEquals(<int>[1, 2, 0x9ABCDEF0]));
}
@@ -354,14 +354,14 @@ class BuilderTest {
List<int> byteList;
{
Builder builder = new Builder(initialSize: 0);
- Offset offset = builder.writeListUint8(<int>[1, 2, 0x9A]);
+ Offset offset = builder.writeListUint8(<int>[1, 2, 3, 4, 0x9A]);
byteList = builder.finish(offset);
}
// read and verify
BufferPointer root = new BufferPointer.fromBytes(byteList);
- List<int> items = const ListReader<int>(const Uint8Reader()).read(root);
- expect(items, hasLength(3));
- expect(items, orderedEquals(<int>[1, 2, 0x9A]));
+ List<int> items = const Uint8ListReader().read(root);
+ expect(items, hasLength(5));
+ expect(items, orderedEquals(<int>[1, 2, 3, 4, 0x9A]));
}
}
« no previous file with comments | « pkg/analyzer/lib/src/summary/flat_buffers.dart ('k') | pkg/analyzer/tool/summary/build_sdk_summaries.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698