diff options
author | Josh Blum <josh@joshknows.com> | 2010-01-26 11:29:14 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-01-26 11:29:14 -0800 |
commit | a98e387578a3aceb15e2bcce4a9cc54d78c30dda (patch) | |
tree | b5e34c422c36a16a3f2379698e81af4c00a66ee3 /test | |
parent | 998aebf83c2796fdfabc2efd804ca14103adcaaf (diff) | |
download | uhd-a98e387578a3aceb15e2bcce4a9cc54d78c30dda.tar.gz uhd-a98e387578a3aceb15e2bcce4a9cc54d78c30dda.tar.bz2 uhd-a98e387578a3aceb15e2bcce4a9cc54d78c30dda.zip |
Switched from indexed properties to named properties.
Added some new properties for getting a list of antenna names,
pps sources, ref sources...
Diffstat (limited to 'test')
-rw-r--r-- | test/device_test.cpp | 4 | ||||
-rw-r--r-- | test/usrp_dboard_test.cpp | 12 |
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]; } |