dart - add Packable interface (#6846)

This commit is contained in:
Ivan Dlugos
2021-09-28 22:23:30 +02:00
committed by GitHub
parent 2ece9e25b4
commit b9d43a557c
14 changed files with 66 additions and 30 deletions

View File

@@ -751,6 +751,7 @@ class BuilderTest {
class ObjectAPITest {
void test_tableStat() {
final object1 = example.StatT(count: 3, id: "foo", val: 4);
expect(object1 is Packable, isTrue);
final fbb = Builder();
fbb.finish(object1.pack(fbb));
final object2 = example.Stat(fbb.buffer).unpack();