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/paths_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/paths_test.cpp')
-rw-r--r-- | host/tests/paths_test.cpp | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/host/tests/paths_test.cpp b/host/tests/paths_test.cpp index 0ccebd333..ef10414c7 100644 --- a/host/tests/paths_test.cpp +++ b/host/tests/paths_test.cpp @@ -8,12 +8,13 @@ #include <uhd/exception.hpp> #include <uhd/utils/paths.hpp> #include <uhdlib/utils/paths.hpp> -#include <boost/test/unit_test.hpp> #include <boost/filesystem/operations.hpp> -#include <vector> +#include <boost/test/unit_test.hpp> #include <iostream> +#include <vector> -BOOST_AUTO_TEST_CASE(test_paths_expandvars) { +BOOST_AUTO_TEST_CASE(test_paths_expandvars) +{ #ifdef UHD_PLATFORM_WIN32 const std::string path_to_expand("\%programdata%/uhd/uhd.conf"); #else @@ -21,8 +22,8 @@ BOOST_AUTO_TEST_CASE(test_paths_expandvars) { #endif const std::string expanded_path = uhd::path_expandvars(path_to_expand); - std::cout << "Expanded path: " << path_to_expand << " -> " - << expanded_path << std::endl; + std::cout << "Expanded path: " << path_to_expand << " -> " << expanded_path + << std::endl; BOOST_CHECK(path_to_expand != expanded_path); #ifdef UHD_PLATFORM_WIN32 @@ -35,13 +36,14 @@ BOOST_AUTO_TEST_CASE(test_paths_expandvars) { } -BOOST_AUTO_TEST_CASE(test_get_paths) { +BOOST_AUTO_TEST_CASE(test_get_paths) +{ using namespace uhd; const std::string tmp_path = get_tmp_path(); const std::string app_path = get_app_path(); const std::string pkg_path = get_pkg_path(); - const auto module_paths = get_module_paths(); + const auto module_paths = get_module_paths(); std::cout << "tmp_path: " << tmp_path << std::endl; std::cout << "app_path: " << app_path << std::endl; @@ -51,22 +53,14 @@ BOOST_AUTO_TEST_CASE(test_get_paths) { } const std::string images_dir_search_path = ""; - const std::string images_dir = get_images_dir(images_dir_search_path); + const std::string images_dir = get_images_dir(images_dir_search_path); BOOST_REQUIRE_THROW( - find_image_path("this_device_does_not_exist.bit", ""), - uhd::io_error - ); + find_image_path("this_device_does_not_exist.bit", ""), uhd::io_error); - const std::string utility_path = find_utility( - "uhd_images_downloader" - ); + const std::string utility_path = find_utility("uhd_images_downloader"); std::cout << "utility_path: " << utility_path << std::endl; - const std::string utility_error = print_utility_error( - "uhd_images_downloader", - "--help" - ); + const std::string utility_error = + print_utility_error("uhd_images_downloader", "--help"); std::cout << "utility_error: " << tmp_path << std::endl; - } - |