Dart - store empty vectors instead of NULL (#6728)

This commit is contained in:
Ivan Dlugos
2021-07-09 21:44:40 +02:00
committed by GitHub
parent 92ae532e43
commit e73fab27d4
5 changed files with 192 additions and 272 deletions

View File

@@ -818,6 +818,13 @@ class ObjectAPITest {
// this fails with lazy lists:
expect(object1.toString(), object1Read.toString());
// empty list must be serialized as such (were stored NULL before v2.0)
fbb.reset();
final object3 = example.TypeAliasesT(v8: [], vf64: null);
fbb.finish(object3.pack(fbb));
final object3Read = example.TypeAliases(fbb.buffer).unpack();
expect(object3.toString(), object3Read.toString());
}
}