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

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

Issue 1571593002: Support for Int64 and fix for the root reference. (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 4f46528817993db051d71b26fd4645231188a0a3..a15f31ef14fdf8cfa300f1db7901db1a29b2b99a 100644
--- a/pkg/analyzer/test/src/summary/flat_buffers_test.dart
+++ b/pkg/analyzer/test/src/summary/flat_buffers_test.dart
@@ -86,6 +86,28 @@ class BuilderTest {
expect(const Int32Reader().vTableGet(object, 1, 15), 20);
}
+ void test_table_int64() {
+ List<int> byteList;
+ {
+ Builder builder = new Builder(initialSize: 0);
+ builder.startTable();
+ builder.addInt8(0, 10);
+ builder.addInt64(1, 20);
+ builder.addInt8(2, 30);
+ builder.addInt8(3, 40);
+ builder.addInt8(4, 50);
+ Offset offset = builder.endTable();
+ byteList = builder.finish(offset);
+ }
+ // read and verify
+ BufferPointer object = new BufferPointer.fromBytes(byteList).derefObject();
+ expect(const Int8Reader().vTableGet(object, 0), 10);
+ expect(const Int64Reader().vTableGet(object, 1), 20);
+ expect(const Int8Reader().vTableGet(object, 2), 30);
+ expect(const Int8Reader().vTableGet(object, 3), 40);
+ expect(const Int8Reader().vTableGet(object, 4), 50);
+ }
+
void test_table_types() {
List<int> byteList;
{

Powered by Google App Engine
This is Rietveld 408576698