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

Go to the source code of this file.

Namespaces

 uhal
 
 uhal::tests
 

Functions

 uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES (NonreachableTestSuite, check_nonreachable_device, MinimalFixture, { const size_t numTests(quickTest ? 1 :10);for(size_t i=0;i< numTests;i++) { HwInterface hw=getHwInterface();if((hw.uri().find("ipbustcp") !=std::string::npos)||(hw.uri().find("ipbuspcie") !=std::string::npos)) { BOOST_CHECK_THROW({ hw.getNode("REG").read();hw.dispatch();}, uhal::exception::TransportLayerError);} else { BOOST_CHECK_THROW({ hw.getNode("REG").read();hw.dispatch();}, uhal::exception::ClientTimeout);} } }) HwInterface getHwWithModifiedControlHubPort(const std