blob: 2f6c06c7f9477ce80621c2e641b96121050f0564 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include <forstio/test/suite.hpp>
#include "remote_loopback.hpp"
namespace {
namespace sch {
using namespace saw::schema;
using TestInterface = Interface<
Member<Function<UInt32, Int64>, "foo">
>;
}
SAW_TEST("Remote Loopback"){
using namespace saw;
remote<rmt::Loopback> rmt;
auto eov = rmt.parse_address();
SAW_EXPECT(eov.is_value(), "Didn't parse correctly");
auto& val = eov.get_value();
interface<sch::TestInterface, encode::Native, storage::Default> iface{
[](data<sch::UInt32>& foo){
return foo.template cast<sch::Int64>();
}
};
auto rpc_srv = rmt.listen(*val, std::move(iface));
}
}
|