summaryrefslogtreecommitdiffstats
path: root/test/device_test.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-01-25 16:07:07 -0800
committerJosh Blum <josh@joshknows.com>2010-01-25 16:07:07 -0800
commit998aebf83c2796fdfabc2efd804ca14103adcaaf (patch)
tree7e3675ffc14e41e390369fdeca4b9d7643ae6834 /test/device_test.cpp
parent069a7ce0570001ea3d9512a11d238ea4d6773f1d (diff)
downloaduhd-998aebf83c2796fdfabc2efd804ca14103adcaaf.tar.gz
uhd-998aebf83c2796fdfabc2efd804ca14103adcaaf.tar.bz2
uhd-998aebf83c2796fdfabc2efd804ca14103adcaaf.zip
Various tweaks, switched to boost unit testing.
Diffstat (limited to 'test/device_test.cpp')
-rw-r--r--test/device_test.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/test/device_test.cpp b/test/device_test.cpp
index 66256ba88..db305097b 100644
--- a/test/device_test.cpp
+++ b/test/device_test.cpp
@@ -2,26 +2,12 @@
// Copyright 2010 Ettus Research LLC
//
+#include <boost/test/unit_test.hpp>
#include <usrp_uhd/device.hpp>
-#include <cppunit/extensions/HelperMacros.h>
-
-/***********************************************************************
- * cpp unit setup
- **********************************************************************/
-class device_test : public CppUnit::TestFixture{
- CPPUNIT_TEST_SUITE(device_test);
- CPPUNIT_TEST(test);
- CPPUNIT_TEST_SUITE_END();
-
-public:
- void test(void);
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION(device_test);
using namespace usrp_uhd;
-void device_test::test(void){
+BOOST_AUTO_TEST_CASE(test_device){
device_addr_t device_addr(DEVICE_ADDR_TYPE_VIRTUAL);
device_addr.virtual_args.num_dboards = 2;
device_addr.virtual_args.num_rx_dsps = 3;
@@ -34,11 +20,11 @@ void device_test::test(void){
std::cout << "Access the mboard" << std::endl;
wax::proxy mb0 = (*dev)[DEVICE_PROP_MBOARD];
std::cout << wax::cast<std::string>(mb0[MBOARD_PROP_NAME]) << std::endl;
- CPPUNIT_ASSERT_EQUAL(
+ BOOST_CHECK_EQUAL(
device_addr.virtual_args.num_dboards,
wax::cast<size_t>(mb0[MBOARD_PROP_NUM_RX_DBOARDS])
);
- CPPUNIT_ASSERT_EQUAL(
+ BOOST_CHECK_EQUAL(
device_addr.virtual_args.num_dboards,
wax::cast<size_t>(mb0[MBOARD_PROP_NUM_TX_DBOARDS])
);