def test_listbuilder_bug(self):
schema = """
@0xbf5147cbbecf40c1;
struct Bar {
x @0 :Int64;
y @1 :Int64;
}
struct Foo {
name @0 :Text;
bars @1 :List(Bar);
}
"""
mod = self.compile(schema)
bars = [mod.Bar(1, 2)]
foo = mod.Foo(b'name', bars)
assert len(foo.bars) == 1
assert foo.bars[0].x == 1
assert foo.bars[0].y == 2
评论列表
文章目录