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

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

Issue 1588043006: Write and read support for Float64 lists in FlatBuffers. (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/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 e7b78045b4d8554ea040446cdd30a35b43e5e126..31cd564cb53ec8f2b454ea12682ea576316fe370 100644
--- a/pkg/analyzer/test/src/summary/flat_buffers_test.dart
+++ b/pkg/analyzer/test/src/summary/flat_buffers_test.dart
@@ -109,6 +109,22 @@ class BuilderTest {
expect(const Int32Reader().vTableGet(object, 4), 40);
}
+ void test_writeList_ofFloat64() {
+ List<double> values = <double>[-1.234567, 3.4E+9, -5.6E-13, 7.8, 12.13];
+ // write
+ List<int> byteList;
+ {
+ Builder builder = new Builder(initialSize: 0);
+ Offset offset = builder.writeListFloat64(values);
+ byteList = builder.finish(offset);
+ }
+ // read and verify
+ BufferPointer root = new BufferPointer.fromBytes(byteList);
+ List<double> items = const Float64ListReader().read(root);
+ expect(items, hasLength(5));
+ expect(items, orderedEquals(values));
+ }
+
void test_writeList_ofInt32() {
List<int> byteList;
{

Powered by Google App Engine
This is Rietveld 408576698