Update style to (almost) conform to ndn-cxx style using clang-format
diff --git a/tests/unit-tests/dispatcher.t.cpp b/tests/unit-tests/dispatcher.t.cpp
index ec24eab..572db31 100644
--- a/tests/unit-tests/dispatcher.t.cpp
+++ b/tests/unit-tests/dispatcher.t.cpp
@@ -19,40 +19,41 @@
*/
#include "ccnx-wrapper.hpp"
-#include "logging.hpp"
#include "dispatcher.hpp"
-#include <boost/test/unit_test.hpp>
-#include <boost/make_shared.hpp>
+#include "logging.hpp"
#include <boost/filesystem.hpp>
-#include <fstream>
+#include <boost/make_shared.hpp>
+#include <boost/test/unit_test.hpp>
#include <cassert>
+#include <fstream>
using namespace Ndnx;
using namespace std;
using namespace boost;
namespace fs = boost::filesystem;
-INIT_LOGGER ("Test.Dispatcher");
+INIT_LOGGER("Test.Dispatcher");
BOOST_AUTO_TEST_SUITE(TestDispatcher)
-void cleanDir(fs::path dir)
+void
+cleanDir(fs::path dir)
{
- if (fs::exists(dir))
- {
+ if (fs::exists(dir)) {
fs::remove_all(dir);
}
}
-void checkRoots(const HashPtr &root1, const HashPtr &root2)
+void
+checkRoots(const HashPtr& root1, const HashPtr& root2)
{
BOOST_CHECK_EQUAL(*root1, *root2);
}
BOOST_AUTO_TEST_CASE(DispatcherTest)
{
- INIT_LOGGERS ();
+ INIT_LOGGERS();
fs::path dir1("./TestDispatcher/test-white-house");
fs::path dir2("./TestDispatcher/test-black-house");
@@ -76,7 +77,7 @@
usleep(14900000);
- _LOG_DEBUG ("checking obama vs romney");
+ _LOG_DEBUG("checking obama vs romney");
checkRoots(d1.SyncRoot(), d2.SyncRoot());
fs::path filename("a_letter_to_romney.txt");
@@ -86,8 +87,7 @@
ofstream ofs;
ofs.open(abf.string().c_str());
- for (int i = 0; i < 5000; i ++)
- {
+ for (int i = 0; i < 5000; i++) {
ofs << words;
}
ofs.close();
@@ -97,7 +97,8 @@
sleep(5);
fs::path ef = dir2 / filename;
- BOOST_REQUIRE_MESSAGE(fs::exists(ef), user1 << " failed to notify " << user2 << " about " << filename.string());
+ BOOST_REQUIRE_MESSAGE(fs::exists(ef), user1 << " failed to notify " << user2 << " about "
+ << filename.string());
BOOST_CHECK_EQUAL(fs::file_size(abf), fs::file_size(ef));
HashPtr fileHash1 = Hash::FromFileContent(abf);
HashPtr fileHash2 = Hash::FromFileContent(ef);