summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/device_test.cpp4
-rw-r--r--test/usrp_dboard_test.cpp12
2 files changed, 8 insertions, 8 deletions
diff --git a/test/device_test.cpp b/test/device_test.cpp
index db305097b..db5810d3d 100644
--- a/test/device_test.cpp
+++ b/test/device_test.cpp
@@ -22,11 +22,11 @@ BOOST_AUTO_TEST_CASE(test_device){
std::cout << wax::cast<std::string>(mb0[MBOARD_PROP_NAME]) << std::endl;
BOOST_CHECK_EQUAL(
device_addr.virtual_args.num_dboards,
- wax::cast<size_t>(mb0[MBOARD_PROP_NUM_RX_DBOARDS])
+ wax::cast<prop_names_t>(mb0[MBOARD_PROP_RX_DBOARD_NAMES]).size()
);
BOOST_CHECK_EQUAL(
device_addr.virtual_args.num_dboards,
- wax::cast<size_t>(mb0[MBOARD_PROP_NUM_TX_DBOARDS])
+ wax::cast<prop_names_t>(mb0[MBOARD_PROP_TX_DBOARD_NAMES]).size()
);
}
diff --git a/test/usrp_dboard_test.cpp b/test/usrp_dboard_test.cpp
index 1e89f36f9..e95068be6 100644
--- a/test/usrp_dboard_test.cpp
+++ b/test/usrp_dboard_test.cpp
@@ -34,12 +34,12 @@ BOOST_AUTO_TEST_CASE(test_manager){
manager::sptr mgr0(new manager(0x0001, 0x0000, ifc0)); //basic rx, basic tx
std::cout << "Testing the dboard manager..." << std::endl;
- BOOST_CHECK_EQUAL(size_t(3), mgr0->get_num_rx_subdevs());
- BOOST_CHECK_EQUAL(size_t(1), mgr0->get_num_tx_subdevs());
+ BOOST_CHECK_EQUAL(size_t(3), mgr0->get_rx_subdev_names().size());
+ BOOST_CHECK_EQUAL(size_t(1), mgr0->get_tx_subdev_names().size());
std::cout << "Testing access (will fail later when db code filled in)..." << std::endl;
- BOOST_CHECK_THROW(mgr0->get_rx_subdev(3), std::out_of_range);
- BOOST_CHECK_THROW(mgr0->get_tx_subdev(1), std::out_of_range);
- (*mgr0->get_rx_subdev(0))[NULL];
- (*mgr0->get_tx_subdev(0))[NULL];
+ BOOST_CHECK_THROW(mgr0->get_rx_subdev(""), std::invalid_argument);
+ BOOST_CHECK_THROW(mgr0->get_tx_subdev("x"), std::invalid_argument);
+ (*mgr0->get_rx_subdev("a"))[NULL];
+ (*mgr0->get_tx_subdev(""))[NULL];
}