diff --git a/test/mp/test/foo-types.h b/test/mp/test/foo-types.h index b96eabfc..1bc6c523 100644 --- a/test/mp/test/foo-types.h +++ b/test/mp/test/foo-types.h @@ -46,6 +46,7 @@ void CustomBuildField(TypeList, Priority<1>, InvokeContext& invoke_co { BuildField(TypeList(), invoke_context, output, value.v1); output.setV2(value.v2); + BuildField(TypeList>(), invoke_context, output, value.v3); } template @@ -55,6 +56,7 @@ decltype(auto) CustomReadField(TypeList, Priority<1>, InvokeContext& return read_dest.update([&](FooCustom& value) { value.v1 = ReadField(TypeList(), invoke_context, mp::Make(custom.getV1()), ReadDestTemp()); value.v2 = custom.getV2(); + value.v3 = ReadField(TypeList>(), invoke_context, mp::Make(custom.getV3()), ReadDestTemp>()); }); } diff --git a/test/mp/test/foo.capnp b/test/mp/test/foo.capnp index 9e6213fd..26890ea5 100644 --- a/test/mp/test/foo.capnp +++ b/test/mp/test/foo.capnp @@ -66,6 +66,7 @@ struct FooStruct $Proxy.wrap("mp::test::FooStruct") { struct FooCustom $Proxy.wrap("mp::test::FooCustom") { v1 @0 :Text; v2 @1 :Int32; + v3 @2 :List(Int32); } struct FooEmpty $Proxy.wrap("mp::test::FooEmpty") { diff --git a/test/mp/test/foo.h b/test/mp/test/foo.h index 779c8db1..a8fd9805 100644 --- a/test/mp/test/foo.h +++ b/test/mp/test/foo.h @@ -34,6 +34,7 @@ struct FooCustom { std::string v1; int v2; + std::vector v3; }; struct FooEmpty diff --git a/test/mp/test/test.cpp b/test/mp/test/test.cpp index f5f35437..715b6d91 100644 --- a/test/mp/test/test.cpp +++ b/test/mp/test/test.cpp @@ -233,9 +233,11 @@ KJ_TEST("Call FooInterface methods") FooCustom custom_in; custom_in.v1 = "v1"; custom_in.v2 = 5; + custom_in.v3 = {10, 20, 30}; FooCustom custom_out = foo->passCustom(custom_in); KJ_EXPECT(custom_in.v1 == custom_out.v1); KJ_EXPECT(custom_in.v2 == custom_out.v2); + KJ_EXPECT(custom_in.v3 == custom_out.v3); foo->passEmpty(FooEmpty{});