diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-03-02 15:25:13 -0800 |
---|---|---|
committer | atrnati <54334261+atrnati@users.noreply.github.com> | 2020-03-03 08:51:32 -0600 |
commit | 876d4150aa3da531ddd687b48afada6e43f79146 (patch) | |
tree | fd72a71419f4cd800d4e500cfcaded4dfc8dc367 /host/tests/mb_controller_test.cpp | |
parent | 1393553d623bdf4ba40d5435c9719b6ce990d9ac (diff) | |
download | uhd-876d4150aa3da531ddd687b48afada6e43f79146.tar.gz uhd-876d4150aa3da531ddd687b48afada6e43f79146.tar.bz2 uhd-876d4150aa3da531ddd687b48afada6e43f79146.zip |
uhd: Apply clang-format against all .cpp and .hpp files in host/
Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of
files that clang-format gets applied against.
Diffstat (limited to 'host/tests/mb_controller_test.cpp')
-rw-r--r-- | host/tests/mb_controller_test.cpp | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/host/tests/mb_controller_test.cpp b/host/tests/mb_controller_test.cpp index 48baadf29..b6fb49371 100644 --- a/host/tests/mb_controller_test.cpp +++ b/host/tests/mb_controller_test.cpp @@ -14,13 +14,25 @@ using namespace uhd::rfnoc; class mock_timekeeper : public mb_controller::timekeeper { public: - uint64_t get_ticks_now() { return _ticks; } + uint64_t get_ticks_now() + { + return _ticks; + } - uint64_t get_ticks_last_pps() { return _ticks; } + uint64_t get_ticks_last_pps() + { + return _ticks; + } - void set_ticks_now(const uint64_t ticks) { _ticks = ticks; } + void set_ticks_now(const uint64_t ticks) + { + _ticks = ticks; + } - void set_ticks_next_pps(const uint64_t ticks) { _ticks = ticks; } + void set_ticks_next_pps(const uint64_t ticks) + { + _ticks = ticks; + } uint64_t _ticks; uint64_t _period; @@ -31,7 +43,10 @@ public: } private: - void set_period(const uint64_t period_ns) { _period = period_ns; } + void set_period(const uint64_t period_ns) + { + _period = period_ns; + } }; class mock_mb_controller : public mb_controller @@ -124,9 +139,9 @@ public: } std::string clock_source = "internal"; - std::string time_source = "internal"; - bool clock_source_out = false; - bool time_source_out = false; + std::string time_source = "internal"; + bool clock_source_out = false; + bool time_source_out = false; }; BOOST_AUTO_TEST_CASE(test_mb_controller) @@ -134,7 +149,7 @@ BOOST_AUTO_TEST_CASE(test_mb_controller) auto mmbc = std::make_shared<mock_mb_controller>(); BOOST_REQUIRE_EQUAL(mmbc->get_num_timekeepers(), 1); - auto tk = mmbc->get_timekeeper(0); + auto tk = mmbc->get_timekeeper(0); auto tk_mock = std::dynamic_pointer_cast<mock_timekeeper>(tk); BOOST_REQUIRE(tk); @@ -152,4 +167,3 @@ BOOST_AUTO_TEST_CASE(test_mb_controller) tk->set_time_next_pps(uhd::time_spec_t(TIME_1)); BOOST_CHECK_EQUAL(tk->get_ticks_last_pps(), TIME_1 * TICK_RATE); } - |