From 876d4150aa3da531ddd687b48afada6e43f79146 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 2 Mar 2020 15:25:13 -0800 Subject: 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. --- host/tests/mb_controller_test.cpp | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'host/tests/mb_controller_test.cpp') 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(); 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(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); } - -- cgit v1.2.3