Update style to (almost) conform to ndn-cxx style using clang-format
diff --git a/tests/unit-tests/fetch-manager.t.cpp b/tests/unit-tests/fetch-manager.t.cpp
index 0c6bb37..24ec688 100644
--- a/tests/unit-tests/fetch-manager.t.cpp
+++ b/tests/unit-tests/fetch-manager.t.cpp
@@ -18,15 +18,14 @@
  * See AUTHORS.md for complete list of ChronoShare authors and contributors.
  */
 
+#include "ccnx-wrapper.hpp"
 #include "fetch-manager.hpp"
 #include "fetcher.hpp"
-#include "ccnx-wrapper.hpp"
-#include <boost/test/unit_test.hpp>
-#include <boost/make_shared.hpp>
 #include "logging.hpp"
+#include <boost/make_shared.hpp>
+#include <boost/test/unit_test.hpp>
 
-
-INIT_LOGGER ("Test.FetchManager");
+INIT_LOGGER("Test.FetchManager");
 
 using namespace Ndnx;
 using namespace std;
@@ -45,47 +44,46 @@
   bool m_done;
   bool m_failed;
 
-  FetcherTestData ()
-    : m_done (false)
-    , m_failed (false)
+  FetcherTestData()
+    : m_done(false)
+    , m_failed(false)
   {
   }
 
   void
-  onData (const Ndnx::Name &deviceName, const Ndnx::Name &basename, uint64_t seqno, Ndnx::PcoPtr pco)
+  onData(const Ccnx::Name& deviceName, const Ccnx::Name& basename, uint64_t seqno, Ccnx::PcoPtr pco)
   {
-    _LOG_TRACE ("onData: " << seqno);
+    _LOG_TRACE("onData: " << seqno);
 
-    recvData.insert (seqno);
-    differentNames.insert (basename);
+    recvData.insert(seqno);
+    differentNames.insert(basename);
     Name name = basename;
     name.appendComp(seqno);
-    segmentNames.insert (name);
+    segmentNames.insert(name);
 
-    BytesPtr data = pco->contentPtr ();
+    BytesPtr data = pco->contentPtr();
 
-    if (data->size () == sizeof(int))
-      {
-        recvContent.insert (*reinterpret_cast<const int*> (head(*data)));
-      }
+    if (data->size() == sizeof(int)) {
+      recvContent.insert(*reinterpret_cast<const int*>(head(*data)));
+    }
 
     // cout << "<<< " << basename << ", " << name << ", " << seqno << endl;
   }
 
   void
-  finish(const Ndnx::Name &deviceName, const Ndnx::Name &baseName)
+  finish(const Ccnx::Name& deviceName, const Ccnx::Name& baseName)
   {
   }
 
   void
-  onComplete (Fetcher &fetcher)
+  onComplete(Fetcher& fetcher)
   {
     m_done = true;
     // cout << "Done" << endl;
   }
 
   void
-  onFail (Fetcher &fetcher)
+  onFail(Fetcher& fetcher)
   {
     m_failed = true;
     // cout << "Failed" << endl;
@@ -113,99 +111,96 @@
 
 }
 
-BOOST_AUTO_TEST_CASE (TestFetcher)
+BOOST_AUTO_TEST_CASE(TestFetcher)
 {
-  INIT_LOGGERS ();
+  INIT_LOGGERS();
 
-  NdnxWrapperPtr ndnx = make_shared<NdnxWrapper> ();
+  CcnxWrapperPtr ccnx = make_shared<CcnxWrapper>();
 
-  Name baseName ("/base");
-  Name deviceName ("/device");
+  Name baseName("/base");
+  Name deviceName("/device");
   /* publish seqnos:  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, <gap 5>, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, <gap 1>, 26 */
   // this will allow us to test our pipeline of 6
-  for (int i = 0; i < 10; i++)
-    {
-      ndnx->publishData (Name (baseName)(i), reinterpret_cast<const unsigned char*> (&i), sizeof(int), 30);
-    }
+  for (int i = 0; i < 10; i++) {
+    ccnx->publishData(Name(baseName)(i), reinterpret_cast<const unsigned char*>(&i), sizeof(int), 30);
+  }
 
-  for (int i = 15; i < 25; i++)
-    {
-      ndnx->publishData (Name (baseName)(i), reinterpret_cast<const unsigned char*> (&i), sizeof(int), 30);
-    }
+  for (int i = 15; i < 25; i++) {
+    ccnx->publishData(Name(baseName)(i), reinterpret_cast<const unsigned char*>(&i), sizeof(int), 30);
+  }
 
   int oneMore = 26;
-  ndnx->publishData (Name (baseName)(oneMore), reinterpret_cast<const unsigned char*> (&oneMore), sizeof(int), 30);
+  ccnx->publishData(Name(baseName)(oneMore), reinterpret_cast<const unsigned char*>(&oneMore),
+                    sizeof(int), 30);
 
   FetcherTestData data;
   ExecutorPtr executor = make_shared<Executor>(1);
-  executor->start ();
+  executor->start();
 
-  Fetcher fetcher (ndnx,
-                   executor,
-                   bind (&FetcherTestData::onData, &data, _1, _2, _3, _4),
-                   bind (&FetcherTestData::finish, &data, _1, _2),
-                   bind (&FetcherTestData::onComplete, &data, _1),
-                   bind (&FetcherTestData::onFail, &data, _1),
-                   deviceName, Name ("/base"), 0, 26,
-                   boost::posix_time::seconds (5)); // this time is not precise
+  Fetcher fetcher(ccnx, executor, bind(&FetcherTestData::onData, &data, _1, _2, _3, _4),
+                  bind(&FetcherTestData::finish, &data, _1, _2),
+                  bind(&FetcherTestData::onComplete, &data, _1),
+                  bind(&FetcherTestData::onFail, &data, _1), deviceName, Name("/base"), 0, 26,
+                  boost::posix_time::seconds(5)); // this time is not precise
 
-  BOOST_CHECK_EQUAL (fetcher.IsActive (), false);
-  fetcher.RestartPipeline ();
-  BOOST_CHECK_EQUAL (fetcher.IsActive (), true);
+  BOOST_CHECK_EQUAL(fetcher.IsActive(), false);
+  fetcher.RestartPipeline();
+  BOOST_CHECK_EQUAL(fetcher.IsActive(), true);
 
   usleep(7000000);
-  BOOST_CHECK_EQUAL (data.m_failed, true);
-  BOOST_CHECK_EQUAL (data.differentNames.size (), 1);
-  BOOST_CHECK_EQUAL (data.segmentNames.size (), 20);
-  BOOST_CHECK_EQUAL (data.recvData.size (), 20);
-  BOOST_CHECK_EQUAL (data.recvContent.size (), 20);
+  BOOST_CHECK_EQUAL(data.m_failed, true);
+  BOOST_CHECK_EQUAL(data.differentNames.size(), 1);
+  BOOST_CHECK_EQUAL(data.segmentNames.size(), 20);
+  BOOST_CHECK_EQUAL(data.recvData.size(), 20);
+  BOOST_CHECK_EQUAL(data.recvContent.size(), 20);
 
   {
     ostringstream recvData;
-    for (set<uint64_t>::iterator i = data.recvData.begin (); i != data.recvData.end (); i++)
+    for (set<uint64_t>::iterator i = data.recvData.begin(); i != data.recvData.end(); i++)
       recvData << *i << ", ";
 
     ostringstream recvContent;
-    for (set<uint64_t>::iterator i = data.recvContent.begin (); i != data.recvContent.end (); i++)
+    for (set<uint64_t>::iterator i = data.recvContent.begin(); i != data.recvContent.end(); i++)
       recvContent << *i << ", ";
 
-    BOOST_CHECK_EQUAL (recvData.str (), "0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, ");
-    BOOST_CHECK_EQUAL (recvData.str (), recvContent.str ());
+    BOOST_CHECK_EQUAL(recvData.str(),
+                      "0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, ");
+    BOOST_CHECK_EQUAL(recvData.str(), recvContent.str());
   }
 
-  BOOST_CHECK_EQUAL (fetcher.IsActive (), false);
-  fetcher.RestartPipeline ();
-  BOOST_CHECK_EQUAL (fetcher.IsActive (), true);
+  BOOST_CHECK_EQUAL(fetcher.IsActive(), false);
+  fetcher.RestartPipeline();
+  BOOST_CHECK_EQUAL(fetcher.IsActive(), true);
 
   usleep(7000000);
-  BOOST_CHECK_EQUAL (data.m_failed, true);
+  BOOST_CHECK_EQUAL(data.m_failed, true);
 
   // publishing missing pieces
-  for (int i = 0; i < 27; i++)
-    {
-      ndnx->publishData (Name (baseName)(i), reinterpret_cast<const unsigned char*> (&i), sizeof(int), 1);
-    }
-  BOOST_CHECK_EQUAL (fetcher.IsActive (), false);
-  fetcher.RestartPipeline ();
-  BOOST_CHECK_EQUAL (fetcher.IsActive (), true);
+  for (int i = 0; i < 27; i++) {
+    ccnx->publishData(Name(baseName)(i), reinterpret_cast<const unsigned char*>(&i), sizeof(int), 1);
+  }
+  BOOST_CHECK_EQUAL(fetcher.IsActive(), false);
+  fetcher.RestartPipeline();
+  BOOST_CHECK_EQUAL(fetcher.IsActive(), true);
 
   usleep(1000000);
-  BOOST_CHECK_EQUAL (data.m_done, true);
+  BOOST_CHECK_EQUAL(data.m_done, true);
 
   {
     ostringstream recvData;
-    for (set<uint64_t>::iterator i = data.recvData.begin (); i != data.recvData.end (); i++)
+    for (set<uint64_t>::iterator i = data.recvData.begin(); i != data.recvData.end(); i++)
       recvData << *i << ", ";
 
     ostringstream recvContent;
-    for (set<uint64_t>::iterator i = data.recvContent.begin (); i != data.recvContent.end (); i++)
+    for (set<uint64_t>::iterator i = data.recvContent.begin(); i != data.recvContent.end(); i++)
       recvContent << *i << ", ";
 
-    BOOST_CHECK_EQUAL (recvData.str (), "0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ");
-    BOOST_CHECK_EQUAL (recvData.str (), recvContent.str ());
+    BOOST_CHECK_EQUAL(recvData.str(),
+                      "0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ");
+    BOOST_CHECK_EQUAL(recvData.str(), recvContent.str());
   }
 
-  executor->shutdown ();
+  executor->shutdown();
 }