Statistics
| Branch: | Tag: | Revision:

root / host / test / addr_test.cpp @ b71d0cbe

History | View | Annotate | Download (1.13 KB)

1
//
2
// Copyright 2010 Ettus Research LLC
3
//
4
// This program is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
//
17

    
18
#include <boost/test/unit_test.hpp>
19
#include <uhd/types/mac_addr.hpp>
20
#include <iostream>
21

    
22
BOOST_AUTO_TEST_CASE(test_mac_addr){
23
    std::cout << "Testing mac addr..." << std::endl;
24
    const std::string mac_addr_str("00:01:23:45:67:89");
25
    uhd::mac_addr_t mac_addr(mac_addr_str);
26
    std::cout << "Input: " << mac_addr_str << std::endl;
27
    std::cout << "Output: " << mac_addr.to_string() << std::endl;
28
    BOOST_CHECK_EQUAL(mac_addr_str, mac_addr.to_string());
29
}