blob: d5132d45cdd0eda11bc02e5cebf8cce295fd74a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#define BOOST_TEST_MODULE TestIceBoxInterface
#include <boost/test/unit_test.hpp>
#include <dlfcn.h>
#include <icetrayService.h>
BOOST_AUTO_TEST_CASE(IceBoxInterface)
{
using SetupFunction = IceTray::Service * (*)(Ice::CommunicatorPtr);
auto sf = reinterpret_cast<SetupFunction>(dlsym(nullptr, "createIceTrayService"));
BOOST_REQUIRE(sf);
auto service = sf(nullptr);
BOOST_REQUIRE(service);
BOOST_REQUIRE_EQUAL(service, IceTray::Service::getCurrent());
delete service;
}
|