File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ $Proxy.includeTypes("mp/test/foo-types.h");
1313
1414interface FooInterface $Proxy.wrap("mp::test::FooImplementation" ) {
1515 add @0 (a :Int32 , b :Int32 ) -> (result :Int32 );
16+ addOut @19 (a :Int32 , b :Int32 , ret :Int32 ) -> (ret :Int32 );
1617 mapSize @1 (map :List(Pair(Text , Text))) -> (result :Int32 );
1718 pass @2 (arg :FooStruct) -> (result :FooStruct) ;
1819 raise @3 (arg :FooStruct) -> (error :FooStruct $Proxy.exception("mp::test::FooStruct" ));
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ class FooImplementation
6262{
6363public:
6464 int add (int a, int b) { return a + b; }
65+ void addOut (int a, int b, int & out) { out = a + b; }
6566 int mapSize (const std::map<std::string, std::string>& map) { return map.size (); }
6667 FooStruct pass (FooStruct foo) { return foo; }
6768 void raise (FooStruct foo) { throw foo; }
Original file line number Diff line number Diff line change @@ -113,6 +113,9 @@ KJ_TEST("Call FooInterface methods")
113113 ProxyClient<messages::FooInterface>* foo = setup.client .get ();
114114
115115 KJ_EXPECT (foo->add (1 , 2 ) == 3 );
116+ int ret;
117+ foo->addOut (3 , 4 , ret);
118+ KJ_EXPECT (ret == 7 );
116119
117120 FooStruct in;
118121 in.name = " name" ;
You can’t perform that action at this time.
0 commit comments