summaryrefslogtreecommitdiffstats
path: root/test/addr_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/addr_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/addr_test.cpp')
-rw-r--r--test/addr_test.cpp26
1 files changed, 5 insertions, 21 deletions
diff --git a/test/addr_test.cpp b/test/addr_test.cpp
index 65792aabc..e2fc36f38 100644
--- a/test/addr_test.cpp
+++ b/test/addr_test.cpp
@@ -2,39 +2,23 @@
// Copyright 2010 Ettus Research LLC
//
+#include <boost/test/unit_test.hpp>
#include <usrp_uhd/device_addr.hpp>
-#include <cppunit/extensions/HelperMacros.h>
-/***********************************************************************
- * cpp unit setup
- **********************************************************************/
-class addr_test : public CppUnit::TestFixture{
- CPPUNIT_TEST_SUITE(addr_test);
- CPPUNIT_TEST(test_mac_addr);
- CPPUNIT_TEST(test_ip_addr);
- CPPUNIT_TEST_SUITE_END();
-
-public:
- void test_mac_addr(void);
- void test_ip_addr(void);
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION(addr_test);
-
-void addr_test::test_mac_addr(void){
+BOOST_AUTO_TEST_CASE(test_mac_addr){
std::cout << "Testing mac addr..." << std::endl;
const std::string mac_addr_str("00:01:23:45:67:89");
usrp_uhd::mac_addr_t mac_addr(mac_addr_str);
std::cout << "Input: " << mac_addr_str << std::endl;
std::cout << "Output: " << mac_addr << std::endl;
- CPPUNIT_ASSERT_EQUAL(mac_addr_str, mac_addr.to_string());
+ BOOST_CHECK_EQUAL(mac_addr_str, mac_addr.to_string());
}
-void addr_test::test_ip_addr(void){
+BOOST_AUTO_TEST_CASE(test_ip_addr){
std::cout << "Testing ip addr..." << std::endl;
const std::string ip_addr_str("192.168.1.10");
usrp_uhd::ip_addr_t ip_addr(ip_addr_str);
std::cout << "Input: " << ip_addr_str << std::endl;
std::cout << "Output: " << ip_addr << std::endl;
- CPPUNIT_ASSERT_EQUAL(ip_addr_str, ip_addr.to_string());
+ BOOST_CHECK_EQUAL(ip_addr_str, ip_addr.to_string());
}