diff options
author | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-14 10:35:25 -0800 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-16 11:40:23 -0800 |
commit | 967be2a4e82b1a125b26bb72a60318a4fb2b50c4 (patch) | |
tree | 8a24954b54d1546dc8049a17e485adb0a605f74f /host/tests/fe_conn_test.cpp | |
parent | aafe4e8b742a0e21d3818f21f34e3c8613132530 (diff) | |
download | uhd-967be2a4e82b1a125b26bb72a60318a4fb2b50c4.tar.gz uhd-967be2a4e82b1a125b26bb72a60318a4fb2b50c4.tar.bz2 uhd-967be2a4e82b1a125b26bb72a60318a4fb2b50c4.zip |
uhd: mpm: apply clang-format to all files
Applying formatting changes to all .cpp and .hpp files in the following
directories:
```
find host/examples/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/tests/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/utils/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find mpm/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
```
Also formatted host/include/, except Cpp03 was used as a the language
standard instead of Cpp11.
```
sed -i 's/ Cpp11/ Cpp03/g' .clang-format
find host/include/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
```
Formatting style was designated by the .clang-format file.
Diffstat (limited to 'host/tests/fe_conn_test.cpp')
-rw-r--r-- | host/tests/fe_conn_test.cpp | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/host/tests/fe_conn_test.cpp b/host/tests/fe_conn_test.cpp index 34ebb7b33..bbf79835f 100644 --- a/host/tests/fe_conn_test.cpp +++ b/host/tests/fe_conn_test.cpp @@ -5,19 +5,20 @@ // SPDX-License-Identifier: GPL-3.0-or-later // -#include <uhd/usrp/fe_connection.hpp> #include <uhd/exception.hpp> +#include <uhd/usrp/fe_connection.hpp> #include <boost/test/unit_test.hpp> using namespace uhd::usrp; -BOOST_AUTO_TEST_CASE(test_quardrature){ +BOOST_AUTO_TEST_CASE(test_quardrature) +{ fe_connection_t IQ("IQ"), QI("QI"), IbQ("IbQ"), QbI("QbI"), QbIb("QbIb"); - BOOST_CHECK(IQ.get_sampling_mode()==fe_connection_t::QUADRATURE); - BOOST_CHECK(QI.get_sampling_mode()==fe_connection_t::QUADRATURE); - BOOST_CHECK(IbQ.get_sampling_mode()==fe_connection_t::QUADRATURE); - BOOST_CHECK(QbI.get_sampling_mode()==fe_connection_t::QUADRATURE); - BOOST_CHECK(QbIb.get_sampling_mode()==fe_connection_t::QUADRATURE); + BOOST_CHECK(IQ.get_sampling_mode() == fe_connection_t::QUADRATURE); + BOOST_CHECK(QI.get_sampling_mode() == fe_connection_t::QUADRATURE); + BOOST_CHECK(IbQ.get_sampling_mode() == fe_connection_t::QUADRATURE); + BOOST_CHECK(QbI.get_sampling_mode() == fe_connection_t::QUADRATURE); + BOOST_CHECK(QbIb.get_sampling_mode() == fe_connection_t::QUADRATURE); BOOST_CHECK(not IQ.is_iq_swapped()); BOOST_CHECK(QI.is_iq_swapped()); @@ -38,12 +39,13 @@ BOOST_AUTO_TEST_CASE(test_quardrature){ BOOST_CHECK(QbIb.is_q_inverted()); } -BOOST_AUTO_TEST_CASE(test_heterodyne){ +BOOST_AUTO_TEST_CASE(test_heterodyne) +{ fe_connection_t II("II"), QQ("QQ"), IbIb("IbIb"), QbQb("QbQb"); - BOOST_CHECK(II.get_sampling_mode()==fe_connection_t::HETERODYNE); - BOOST_CHECK(QQ.get_sampling_mode()==fe_connection_t::HETERODYNE); - BOOST_CHECK(IbIb.get_sampling_mode()==fe_connection_t::HETERODYNE); - BOOST_CHECK(QbQb.get_sampling_mode()==fe_connection_t::HETERODYNE); + BOOST_CHECK(II.get_sampling_mode() == fe_connection_t::HETERODYNE); + BOOST_CHECK(QQ.get_sampling_mode() == fe_connection_t::HETERODYNE); + BOOST_CHECK(IbIb.get_sampling_mode() == fe_connection_t::HETERODYNE); + BOOST_CHECK(QbQb.get_sampling_mode() == fe_connection_t::HETERODYNE); BOOST_CHECK(not II.is_iq_swapped()); BOOST_CHECK(QQ.is_iq_swapped()); @@ -66,12 +68,13 @@ BOOST_AUTO_TEST_CASE(test_heterodyne){ BOOST_CHECK_THROW(fe_connection_t dummy("QbQ"), uhd::value_error); } -BOOST_AUTO_TEST_CASE(test_real){ +BOOST_AUTO_TEST_CASE(test_real) +{ fe_connection_t I("I"), Q("Q"), Ib("Ib"), Qb("Qb"); - BOOST_CHECK(I.get_sampling_mode()==fe_connection_t::REAL); - BOOST_CHECK(Q.get_sampling_mode()==fe_connection_t::REAL); - BOOST_CHECK(Ib.get_sampling_mode()==fe_connection_t::REAL); - BOOST_CHECK(Qb.get_sampling_mode()==fe_connection_t::REAL); + BOOST_CHECK(I.get_sampling_mode() == fe_connection_t::REAL); + BOOST_CHECK(Q.get_sampling_mode() == fe_connection_t::REAL); + BOOST_CHECK(Ib.get_sampling_mode() == fe_connection_t::REAL); + BOOST_CHECK(Qb.get_sampling_mode() == fe_connection_t::REAL); BOOST_CHECK(not I.is_iq_swapped()); BOOST_CHECK(Q.is_iq_swapped()); @@ -89,7 +92,8 @@ BOOST_AUTO_TEST_CASE(test_real){ BOOST_CHECK(not Qb.is_q_inverted()); } -BOOST_AUTO_TEST_CASE(test_invalid){ +BOOST_AUTO_TEST_CASE(test_invalid) +{ BOOST_CHECK_THROW(fe_connection_t dummy("blah"), uhd::value_error); BOOST_CHECK_THROW(fe_connection_t dummy("123456"), uhd::value_error); BOOST_CHECK_THROW(fe_connection_t dummy("ii"), uhd::value_error); |