4 #define BOOST_TEST_DYN_LINK
5 #define BOOST_TEST_MODULE LMapForceReadOnlyPluginTest
6 #include <boost/test/unit_test.hpp>
7 using namespace boost::unit_test_framework;
11 #include "DeviceAccessVersion.h"
20 device.
open(
"(logicalNameMap?map=forceReadOnlyPlugin.xlmap)");
24 BOOST_CHECK(!info.isWriteable());
25 BOOST_CHECK(info.isReadable());
28 BOOST_CHECK(!acc.isWriteable());
29 BOOST_CHECK(acc.isReadable());
32 BOOST_CHECK_NO_THROW(acc.read());
42 device.
open(
"(logicalNameMap?map=forceReadOnlyPlugin2.xlmap)");
46 BOOST_CHECK(!infoA.isWriteable());
47 BOOST_CHECK(infoA.isReadable());
50 BOOST_CHECK(!accA.isWriteable());
51 BOOST_CHECK(accA.isReadable());
53 auto infoB = cat.getRegister(
"Test/B");
54 BOOST_CHECK(!infoB.isWriteable());
55 BOOST_CHECK(infoB.isReadable());
58 BOOST_CHECK(!accB.isWriteable());
59 BOOST_CHECK(accB.isReadable());
60 BOOST_CHECK_NO_THROW(accB.read());