Commit cde4077f authored by Samuel Debionne's avatar Samuel Debionne
Browse files

Add a test for RPC interface without events

parent 330c3033
Pipeline #25276 failed with stages
in 23 minutes and 49 seconds
......@@ -15,13 +15,24 @@ target_link_libraries(test_rpc
add_test(NAME test_rpc COMMAND ${MPIEXEC_EXECUTABLE} -n 2 test_rpc)
add_executable(test_meta
add_executable(test_rpc_meta
test_meta.cpp
)
target_link_libraries(test_meta
target_link_libraries(test_rpc_meta
lima-core
Boost::unit_test_framework
)
add_test(NAME test_meta COMMAND test_meta)
add_test(NAME test_rpc_meta COMMAND test_rpc_meta)
add_executable(test_rpc_client
test_client.cpp
)
target_link_libraries(test_rpc_client
lima-core
Boost::unit_test_framework
)
add_test(NAME test_rpc_client COMMAND test_rpc_client)
// Copyright (C) 2018 Samuel Debionne, ESRF.
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <chrono>
#define BOOST_TEST_MODULE rpc
#include <boost/test/unit_test.hpp>
#include <lima/rpc/client.hpp>
namespace mpi = boost::mpi;
namespace rpc = lima::rpc;
struct calculator_without_events
{
using value_type = double;
double add(double v);
double sub(double v);
double mult(double v);
double div(double v);
double result() const;
};
LIMA_RPC_INTERFACE(calculator_without_events, \
add, sub, mult, div, result \
);
BOOST_AUTO_TEST_CASE(test_without_events)
{
mpi::communicator world;
using client_t = rpc::client<calculator_without_events>;
client_t client(world);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment