diff --git a/tests/unit-tests/sync-core.t.cpp b/tests/unit-tests/sync-core.t.cpp
index bfdaec2..0d55fd1 100644
--- a/tests/unit-tests/sync-core.t.cpp
+++ b/tests/unit-tests/sync-core.t.cpp
@@ -17,13 +17,12 @@
  *
  * See AUTHORS.md for complete list of ChronoShare authors and contributors.
  */
-
-#include "sync-core.hpp"
 #include "logging.hpp"
+#include "sync-core.hpp"
 
-#include <boost/test/unit_test.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/make_shared.hpp>
+#include <boost/test/unit_test.hpp>
 
 using namespace std;
 using namespace Ndnx;
@@ -34,25 +33,25 @@
 
 BOOST_AUTO_TEST_SUITE(SyncCoreTests)
 
-void callback(const SyncStateMsgPtr &msg)
+void
+callback(const SyncStateMsgPtr& msg)
 {
   BOOST_CHECK(msg->state_size() > 0);
   int size = msg->state_size();
   int index = 0;
-  while (index < size)
-  {
+  while (index < size) {
     SyncState state = msg->state(index);
     BOOST_CHECK(state.has_old_seq());
     BOOST_CHECK(state.old_seq() >= 0);
-    if (state.seq() != 0)
-    {
+    if (state.seq() != 0) {
       BOOST_CHECK(state.old_seq() != state.seq());
     }
     index++;
   }
 }
 
-void checkRoots(const HashPtr &root1, const HashPtr &root2)
+void
+checkRoots(const HashPtr& root1, const HashPtr& root2)
 {
   BOOST_CHECK_EQUAL(*root1, *root2);
 }
@@ -64,8 +63,7 @@
   string dir = "./SyncCoreTest";
   // clean the test dir
   path d(dir);
-  if (exists(d))
-  {
+  if (exists(d)) {
     remove_all(d);
   }
 
@@ -81,9 +79,9 @@
   SyncLogPtr log1(new SyncLog(dir1, user1.toString()));
   SyncLogPtr log2(new SyncLog(dir2, user2.toString()));
 
-  SyncCore *core1 = new SyncCore(log1, user1, loc1, syncPrefix, bind(callback, _1), c1);
+  SyncCore* core1 = new SyncCore(log1, user1, loc1, syncPrefix, bind(callback, _1), c1);
   usleep(10000);
-  SyncCore *core2 = new SyncCore(log2, user2, loc2, syncPrefix, bind(callback, _1), c2);
+  SyncCore* core2 = new SyncCore(log2, user2, loc2, syncPrefix, bind(callback, _1), c2);
 
   sleep(1);
   checkRoots(core1->root(), core2->root());
@@ -94,23 +92,23 @@
   usleep(100000);
   checkRoots(core1->root(), core2->root());
   BOOST_CHECK_EQUAL(core2->seq(user1), 1);
-  BOOST_CHECK_EQUAL(log2->LookupLocator (user1), loc1);
+  BOOST_CHECK_EQUAL(log2->LookupLocator(user1), loc1);
 
   core1->updateLocalState(5);
   usleep(100000);
   checkRoots(core1->root(), core2->root());
   BOOST_CHECK_EQUAL(core2->seq(user1), 5);
-  BOOST_CHECK_EQUAL(log2->LookupLocator (user1), loc1);
+  BOOST_CHECK_EQUAL(log2->LookupLocator(user1), loc1);
 
   core2->updateLocalState(10);
   usleep(100000);
   checkRoots(core1->root(), core2->root());
   BOOST_CHECK_EQUAL(core1->seq(user2), 10);
-  BOOST_CHECK_EQUAL(log1->LookupLocator (user2), loc2);
+  BOOST_CHECK_EQUAL(log1->LookupLocator(user2), loc2);
 
   // simple simultaneous data generation
   // _LOG_TRACE ("\n\n\n\n\n\n----------Simultaneous\n");
-  _LOG_TRACE ("Simultaneous");
+  _LOG_TRACE("Simultaneous");
 
   core1->updateLocalState(11);
   usleep(100);
@@ -120,14 +118,13 @@
   BOOST_CHECK_EQUAL(core1->seq(user2), 15);
   BOOST_CHECK_EQUAL(core2->seq(user1), 11);
 
-  BOOST_CHECK_EQUAL(log1->LookupLocator (user1), loc1);
-  BOOST_CHECK_EQUAL(log1->LookupLocator (user2), loc2);
-  BOOST_CHECK_EQUAL(log2->LookupLocator (user1), loc1);
-  BOOST_CHECK_EQUAL(log2->LookupLocator (user2), loc2);
+  BOOST_CHECK_EQUAL(log1->LookupLocator(user1), loc1);
+  BOOST_CHECK_EQUAL(log1->LookupLocator(user2), loc2);
+  BOOST_CHECK_EQUAL(log2->LookupLocator(user1), loc1);
+  BOOST_CHECK_EQUAL(log2->LookupLocator(user2), loc2);
 
   // clean the test dir
-  if (exists(d))
-  {
+  if (exists(d)) {
     remove_all(d);
   }
 }
