Add native types under capnp.types for use with ListSchema

This commit is contained in:
Jason Paryani
2014-11-20 10:24:10 -08:00
parent 977f471dec
commit 42c0424e6e
4 changed files with 115 additions and 0 deletions

View File

@@ -44,3 +44,7 @@ def test_annotations(annotations):
assert annotation_list[0].test == 100
assert annotation_list[1].test == 101
annotation = annotations.TestAnnotationFour.schema.node.annotations[0]
annotation_list = annotation.value.list.as_list(capnp.ListSchema(capnp.types.UInt16))
assert annotation_list[0] == 200
assert annotation_list[1] == 201