summaryrefslogtreecommitdiffstats
path: root/test/usrp_dboard_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/usrp_dboard_test.cpp')
-rw-r--r--test/usrp_dboard_test.cpp26
1 files changed, 6 insertions, 20 deletions
diff --git a/test/usrp_dboard_test.cpp b/test/usrp_dboard_test.cpp
index 8d8b1de4a..1e89f36f9 100644
--- a/test/usrp_dboard_test.cpp
+++ b/test/usrp_dboard_test.cpp
@@ -2,8 +2,8 @@
// Copyright 2010 Ettus Research LLC
//
+#include <boost/test/unit_test.hpp>
#include <usrp_uhd/usrp/dboard/manager.hpp>
-#include <cppunit/extensions/HelperMacros.h>
using namespace usrp_uhd::usrp::dboard;
@@ -26,21 +26,7 @@ public:
std::string read_spi (spi_dev_t, spi_latch_t, size_t){return "";}
};
-/***********************************************************************
- * cpp unit setup
- **********************************************************************/
-class dboard_test : public CppUnit::TestFixture{
- CPPUNIT_TEST_SUITE(dboard_test);
- CPPUNIT_TEST(test_manager);
- CPPUNIT_TEST_SUITE_END();
-
-public:
- void test_manager(void);
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION(dboard_test);
-
-void dboard_test::test_manager(void){
+BOOST_AUTO_TEST_CASE(test_manager){
std::cout << "Making a dummy usrp dboard interface..." << std::endl;
interface::sptr ifc0(new dummy_interface());
@@ -48,12 +34,12 @@ void dboard_test::test_manager(void){
manager::sptr mgr0(new manager(0x0001, 0x0000, ifc0)); //basic rx, basic tx
std::cout << "Testing the dboard manager..." << std::endl;
- CPPUNIT_ASSERT_EQUAL(size_t(3), mgr0->get_num_rx_subdevs());
- CPPUNIT_ASSERT_EQUAL(size_t(1), mgr0->get_num_tx_subdevs());
+ BOOST_CHECK_EQUAL(size_t(3), mgr0->get_num_rx_subdevs());
+ BOOST_CHECK_EQUAL(size_t(1), mgr0->get_num_tx_subdevs());
std::cout << "Testing access (will fail later when db code filled in)..." << std::endl;
- CPPUNIT_ASSERT_THROW(mgr0->get_rx_subdev(3), std::out_of_range);
- CPPUNIT_ASSERT_THROW(mgr0->get_tx_subdev(1), std::out_of_range);
+ 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];
}