#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 <boost/filesystem.hpp>
#include <vector>
#include <algorithm>
#include <string>
#include <iostream>
#include <cstdlib>
#include <typeinfo>
Go to the source code of this file.
Namespaces | |
uhal | |
uhal::tests | |
Functions | |
uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES (SingleReadWriteTestSuite, connect_write_read, DummyHardwareFixture, { HwInterface hw=getHwInterface();uint32_t x1=static_cast< uint32_t >(rand());uint32_t x2=static_cast< uint32_t >(rand());hw.getNode("SUBSYSTEM1.REG").write(x1);hw.getNode("SUBSYSTEM2.REG").write(x2);ValWord< uint32_t > mem1=hw.getNode("SUBSYSTEM1.REG").read();ValWord< uint32_t > mem2=hw.getNode("SUBSYSTEM2.REG").read();BOOST_CHECK(!mem1.valid());BOOST_CHECK(!mem2.valid());BOOST_CHECK_THROW(mem1.value(), uhal::exception::NonValidatedMemory);BOOST_CHECK_THROW(mem2.value(), uhal::exception::NonValidatedMemory);BOOST_CHECK_NO_THROW(hw.dispatch());BOOST_CHECK(mem1.valid());BOOST_CHECK_EQUAL(mem1.value(), x1);BOOST_CHECK_EQUAL(mem2.value(), x2);}) UHAL_TESTS_DEFINE_CLIENT_TEST_CASES(SingleReadWriteTestSuite | |
boost::filesystem::path | uhal::tests::fn ("dummy_address.xml") |
hw | uhal::tests::setTimeoutPeriod (timeout) |
hw | uhal::tests::getNode ("REG").write(x) |
uhal::tests::BOOST_CHECK (!mem.valid()) | |
uhal::tests::BOOST_CHECK_THROW (mem.value(), uhal::exception::NonValidatedMemory) | |
uhal::tests::BOOST_CHECK_NO_THROW (hw.dispatch()) | |
uhal::tests::BOOST_CHECK (mem.valid()) | |
uhal::tests::BOOST_CHECK_EQUAL (mem.value(), x) | |
Variables | |
uhal::tests::on_the_fly_connect_write_read | |
uhal::tests::address_file = ( conn_fn.parent_path() /fn ).string() | |
std::string | uhal::tests::uri = getHwInterface().uri() |
uint32_t | uhal::tests::x = static_cast<uint32_t> ( rand() ) |