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

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

Issue 1685263003: Minor improvements to list representation in flatbuffers. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add a test Created 4 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/summary/format.dart ('k') | pkg/analyzer/tool/summary/generate.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 55aa781e7bf2114cebff61d275bde8ca605c6c4b..a9ebe83827964e269ec839e63024ee67a6cc9c40 100644
--- a/pkg/analyzer/test/src/summary/flat_buffers_test.dart
+++ b/pkg/analyzer/test/src/summary/flat_buffers_test.dart
@@ -146,6 +146,22 @@ class BuilderTest {
expect(const Uint32Reader().vTableGet(object, 5), 0x9ABCDEF0);
}
+ void test_writeList_of_Uint32() {
+ List<int> values = <int>[10, 100, 12345, 0x9abcdef0];
+ // write
+ List<int> byteList;
+ {
+ Builder builder = new Builder(initialSize: 0);
+ Offset offset = builder.writeListUint32(values);
+ byteList = builder.finish(offset);
+ }
+ // read and verify
+ BufferPointer root = new BufferPointer.fromBytes(byteList);
+ List<int> items = const Uint32ListReader().read(root);
+ expect(items, hasLength(4));
+ expect(items, orderedEquals(values));
+ }
+
void test_writeList_ofFloat64() {
List<double> values = <double>[-1.234567, 3.4E+9, -5.6E-13, 7.8, 12.13];
// write
« no previous file with comments | « pkg/analyzer/lib/src/summary/format.dart ('k') | pkg/analyzer/tool/summary/generate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698