summaryrefslogtreecommitdiff
path: root/modules/remote/tests
diff options
context:
space:
mode:
authorClaudius 'keldu' Holeksa <mail@keldu.de>2024-10-22 14:24:32 +0200
committerClaudius 'keldu' Holeksa <mail@keldu.de>2024-10-22 14:24:32 +0200
commit98cf3372f2ed4e61ccb0acc522549aaa3d18fd59 (patch)
tree10f876ed648977c6246496801a4525abf123adf1 /modules/remote/tests
parentf2a1a3f56768d9aa03796808206f067daa5e0aa0 (diff)
Fixing interface deduction type
Diffstat (limited to 'modules/remote/tests')
-rw-r--r--modules/remote/tests/remote_loopback.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/modules/remote/tests/remote_loopback.cpp b/modules/remote/tests/remote_loopback.cpp
index 0450c21..d6f1e73 100644
--- a/modules/remote/tests/remote_loopback.cpp
+++ b/modules/remote/tests/remote_loopback.cpp
@@ -28,16 +28,22 @@ SAW_TEST("Remote Loopback RPC"){
SAW_EXPECT(eo_u32_srv.is_value(), std::string{"Couldn't listen: "} + std::string{eo_u32_srv.get_error().get_category()});
auto& u32_srv = eo_u32_srv.get_value();
- auto eo_u64_srv = rmt.template data_listen<sch::UInt64, encode::Native>(*addr);
- SAW_EXPECT(eo_u64_srv.is_value(), std::string{"Couldn't listen: "} + std::string{eo_u64_srv.get_error().get_category()});
- auto& u64_srv = eo_u64_srv.get_value();
+ auto eo_i64_srv = rmt.template data_listen<sch::Int64, encode::Native>(*addr);
+ SAW_EXPECT(eo_i64_srv.is_value(), std::string{"Couldn't listen: "} + std::string{eo_i64_srv.get_error().get_category()});
+ auto& i64_srv = eo_i64_srv.get_value();
- auto eo_rpc_srv = rmt.template listen<sch::TestInterface>(*addr);
+ auto eo_rpc_srv = rmt.template rpc_listen<sch::TestInterface, encode::Native>(*addr, {
+ [](data<sch::UInt32, encode::Native> input) -> error_or<data<sch::Int64, encode::Native>> {
+ data<sch::Int64, encode::Native> rv;
+ rv.set(input.get() * 2);
+ return rv;
+ }
+ });
SAW_EXPECT(eo_rpc_srv.is_value(), std::string{"Couldn't listen: "} + std::string{eo_rpc_srv.get_error().get_category()});
auto& rpc_srv = eo_rpc_srv.get_value();
id<sch::UInt32> id32{0u};
- id<sch::UInt64> id64{0u};
+ id<sch::Int64> id64{0u};
}