build: Warnings correction for gcc 4.2

Also in this commit some code style corrections.

Change-Id: Idf2b5b96b328fb3dbea7440362c84d7759a10ec5
Refs: #1429
diff --git a/tests/management/nfd-control-command.cpp b/tests/management/nfd-control-command.cpp
index 5cf1910..2a3dec4 100644
--- a/tests/management/nfd-control-command.cpp
+++ b/tests/management/nfd-control-command.cpp
@@ -5,9 +5,8 @@
  */
 
 #include "management/nfd-control-command.hpp"
-// Having a separate compilation unit is necessary to ensure .hpp can compile on its own.
 
-#include <boost/test/unit_test.hpp>
+#include "boost-test.hpp"
 
 namespace ndn {
 namespace nfd {
diff --git a/tests/management/nfd-control-parameters.cpp b/tests/management/nfd-control-parameters.cpp
index d5320b1..d8c203b 100644
--- a/tests/management/nfd-control-parameters.cpp
+++ b/tests/management/nfd-control-parameters.cpp
@@ -5,9 +5,8 @@
  */
 
 #include "management/nfd-control-parameters.hpp"
-// Having a separate compilation unit is necessary to ensure .hpp can compile on its own.
 
-#include <boost/test/unit_test.hpp>
+#include "boost-test.hpp"
 
 namespace ndn {
 namespace nfd {
diff --git a/tests/management/nfd-controller.cpp b/tests/management/nfd-controller.cpp
index 9176690..37b9cc6 100644
--- a/tests/management/nfd-controller.cpp
+++ b/tests/management/nfd-controller.cpp
@@ -5,11 +5,11 @@
  */
 
 #include "management/nfd-controller.hpp"
-// Having a separate compilation unit is necessary to ensure .hpp can compile on its own.
 #include "management/nfd-control-response.hpp"
 
 #include "../transport/dummy-face.hpp"
-#include <boost/test/unit_test.hpp>
+
+#include "boost-test.hpp"
 
 namespace ndn {
 namespace nfd {
diff --git a/tests/management/nfd-face-event-notification.cpp b/tests/management/nfd-face-event-notification.cpp
index 76be7c4..2ff00cf 100644
--- a/tests/management/nfd-face-event-notification.cpp
+++ b/tests/management/nfd-face-event-notification.cpp
@@ -6,7 +6,7 @@
 
 #include "management/nfd-face-event-notification.hpp"
 
-#include <boost/test/unit_test.hpp>
+#include "boost-test.hpp"
 
 namespace ndn {
 namespace nfd {
diff --git a/tests/management/nfd-face-status.cpp b/tests/management/nfd-face-status.cpp
index 08b5fb0..56693dd 100644
--- a/tests/management/nfd-face-status.cpp
+++ b/tests/management/nfd-face-status.cpp
@@ -6,7 +6,7 @@
 
 #include "management/nfd-face-status.hpp"
 
-#include <boost/test/unit_test.hpp>
+#include "boost-test.hpp"
 
 namespace ndn {
 namespace nfd {
diff --git a/tests/management/nfd-forwarder-status.cpp b/tests/management/nfd-forwarder-status.cpp
index d881ad1..2523795 100644
--- a/tests/management/nfd-forwarder-status.cpp
+++ b/tests/management/nfd-forwarder-status.cpp
@@ -7,7 +7,7 @@
 #include "management/nfd-forwarder-status.hpp"
 #include "data.hpp"
 
-#include <boost/test/unit_test.hpp>
+#include "boost-test.hpp"
 
 namespace ndn {
 namespace nfd {
diff --git a/tests/management/test-ndnd-forwarding-entry.cpp b/tests/management/test-ndnd-forwarding-entry.cpp
index 7ad5c94..c116fd6 100644
--- a/tests/management/test-ndnd-forwarding-entry.cpp
+++ b/tests/management/test-ndnd-forwarding-entry.cpp
@@ -4,19 +4,10 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "management/ndnd-forwarding-entry.hpp"
 
-#if __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wtautological-compare"
-#endif
+#include "boost-test.hpp"
 
-#include <fstream>
-#include <boost/test/output_test_stream.hpp>
-
-using namespace std;
 namespace ndn {
 namespace ndnd {
 
@@ -40,7 +31,7 @@
 BOOST_AUTO_TEST_CASE (Decode)
 {
   ForwardingEntry forwardingEntry;
-  
+
   BOOST_REQUIRE_NO_THROW(forwardingEntry.wireDecode(Block(FORWARDING_ENTRY, sizeof(FORWARDING_ENTRY))));
 
   BOOST_REQUIRE_EQUAL(forwardingEntry.getAction(), "selfreg");
diff --git a/tests/management/test-nfd-control.cpp b/tests/management/test-nfd-control.cpp
index 68eece2..0aabbe9 100644
--- a/tests/management/test-nfd-control.cpp
+++ b/tests/management/test-nfd-control.cpp
@@ -8,10 +8,7 @@
 #include "management/nfd-fib-management-options.hpp"
 #include "management/nfd-face-management-options.hpp"
 
-#include <boost/test/unit_test.hpp>
-#include <boost/test/output_test_stream.hpp>
-
-using namespace std;
+#include "boost-test.hpp"
 
 namespace ndn {
 namespace nfd {
diff --git a/tests/management/test-nfd-fib-entry.cpp b/tests/management/test-nfd-fib-entry.cpp
index e92c39f..ccb26d5 100644
--- a/tests/management/test-nfd-fib-entry.cpp
+++ b/tests/management/test-nfd-fib-entry.cpp
@@ -6,8 +6,7 @@
 
 #include "management/nfd-fib-entry.hpp"
 
-#include <boost/test/unit_test.hpp>
-#include <boost/test/output_test_stream.hpp>
+#include "boost-test.hpp"
 
 namespace ndn {
 namespace nfd {
diff --git a/tests/management/test-nrd.cpp b/tests/management/test-nrd.cpp
index 92622f0..197857d 100644
--- a/tests/management/test-nrd.cpp
+++ b/tests/management/test-nrd.cpp
@@ -6,10 +6,7 @@
 
 #include "management/nrd-prefix-reg-options.hpp"
 
-#include <boost/test/unit_test.hpp>
-#include <boost/test/output_test_stream.hpp>
-
-using namespace std;
+#include "boost-test.hpp"
 
 namespace ndn {
 namespace nrd {
@@ -21,38 +18,39 @@
   0x08, 0x03, 0x72, 0x65, 0x67, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x66, 0x01, 0x00,
 };
 
-BOOST_AUTO_TEST_CASE (PrefixRegOptionsEncode)
+BOOST_AUTO_TEST_CASE(PrefixRegOptionsEncode)
 {
-  Name n ("/localhost/reg/test");
+  Name n("/localhost/reg/test");
   PrefixRegOptions opt;
 
-  opt.setName (n);
-  opt.setFaceId (0);
-  opt.setCost (0);
+  opt.setName(n);
+  opt.setFaceId(0);
+  opt.setCost(0);
 
-  const Block& blk = opt.wireEncode ();
+  const Block& blk = opt.wireEncode();
 
   BOOST_CHECK_EQUAL_COLLECTIONS(RealPrefixRegOptions,
-                                RealPrefixRegOptions + sizeof (RealPrefixRegOptions),
-                                blk.begin (), blk.end ());
+                                RealPrefixRegOptions + sizeof(RealPrefixRegOptions),
+                                blk.begin(), blk.end());
 
   std::ostringstream os;
   os << opt;
   BOOST_CHECK_EQUAL(os.str(), "PrefixRegOptions(Prefix: /localhost/reg/test, "
-                    "FaceID: 0, Flags: 1, Cost: 0, ExpirationPeriod: -9223372036854775808 milliseconds, Protocol: )");
+                    "FaceID: 0, Flags: 1, Cost: 0, "
+                    "ExpirationPeriod: -9223372036854775808 milliseconds, Protocol: )");
 }
 
-BOOST_AUTO_TEST_CASE (PrefixRegOptionsDecoding)
+BOOST_AUTO_TEST_CASE(PrefixRegOptionsDecoding)
 {
-  Block blk (RealPrefixRegOptions, sizeof (RealPrefixRegOptions));
-  Name n ("/localhost/reg/test");
+  Block blk(RealPrefixRegOptions, sizeof(RealPrefixRegOptions));
+  Name n("/localhost/reg/test");
   PrefixRegOptions opt;
 
-  BOOST_REQUIRE_NO_THROW (opt.wireDecode (blk));
-  
-  BOOST_CHECK_EQUAL (opt.getName (), n);
-  BOOST_CHECK_EQUAL (opt.getFaceId (), 0);
-  BOOST_CHECK_EQUAL (opt.getCost (), 0);
+  BOOST_REQUIRE_NO_THROW(opt.wireDecode(blk));
+
+  BOOST_CHECK_EQUAL(opt.getName(), n);
+  BOOST_CHECK_EQUAL(opt.getFaceId(), 0);
+  BOOST_CHECK_EQUAL(opt.getCost(), 0);
 }
 
 BOOST_AUTO_TEST_SUITE_END()