μHAL (v2.7.9)
Part of the IPbus software repository
Namespaces | Functions | Variables
test_config_space.cpp File Reference
#include "uhal/uhal.hpp"
#include "uhal/ProtocolIPbusCore.hpp"
#include "uhal/tests/definitions.hpp"
#include "uhal/tests/fixtures.hpp"
#include "uhal/tests/tools.hpp"
#include <boost/test/unit_test.hpp>
Include dependency graph for test_config_space.cpp:

Go to the source code of this file.

Namespaces

 uhal
 
 uhal::tests
 

Functions

 uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES (ConfigSpaceTestSuite, read_fullWord, DummyHardwareFixture, { HwInterface hw=getHwInterface();IPbusCore &client=dynamic_cast< IPbusCore & >(hw.getClient());for(size_t i=0;i< 10;i++) { const uint32_t expectedValue=uint16_t(getpid())<< 16|i;switch(deviceType) { case IPBUS_1_3_UDP :case IPBUS_1_3_TCP :case IPBUS_1_3_CONTROLHUB :BOOST_CHECK_THROW(client.readConfigurationSpace(i), exception::ValidationError);break;default:ValWord< uint32_t > x=client.readConfigurationSpace(i);client.dispatch();BOOST_CHECK_EQUAL(x.value(), expectedValue);} } }) UHAL_TESTS_DEFINE_CLIENT_TEST_CASES(ConfigSpaceTestSuite
 
 uhal::tests::for (size_t i=0;i< lDepths.size();i++)
 

Variables

 uhal::tests::read_masked
 
IPbusCore & uhal::tests::client = dynamic_cast<IPbusCore&>(hw.getClient())