Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LimaGroup
Lima2
Commits
cde4077f
Commit
cde4077f
authored
Sep 06, 2019
by
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
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
test/rpc/CMakeLists.txt
View file @
cde4077f
...
...
@@ -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
)
test/rpc/test_client.cpp
0 → 100644
View file @
cde4077f
// 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
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment