build: Warnings correction for gcc 4.2

Also in this commit some code style corrections.

Change-Id: Idf2b5b96b328fb3dbea7440362c84d7759a10ec5
Refs: #1429
diff --git a/tests/boost-test.hpp b/tests/boost-test.hpp
new file mode 100644
index 0000000..e1198ce
--- /dev/null
+++ b/tests/boost-test.hpp
@@ -0,0 +1,18 @@
+/**
+ * Copyright (C) 2014 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
+ */
+
+
+#ifndef NDN_TESTS_BOOST_TEST_HPP
+#define NDN_TESTS_BOOST_TEST_HPP
+
+// suppress warnings from Boost.Test
+#pragma GCC system_header
+#pragma clang system_header
+
+#include <boost/test/unit_test.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/test/output_test_stream.hpp>
+
+#endif // NDN_TESTS_BOOST_TEST_HPP
diff --git a/tests/key-locator.cpp b/tests/key-locator.cpp
index 00f4ff9..fac6729 100644
--- a/tests/key-locator.cpp
+++ b/tests/key-locator.cpp
@@ -5,8 +5,7 @@
 
 #include "key-locator.hpp"
 
-#include <boost/test/unit_test.hpp>
-#include <boost/concept_check.hpp>
+#include "boost-test.hpp"
 
 namespace ndn {
 
diff --git a/tests/main.cpp b/tests/main.cpp
index 10f957c..3e0ae89 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -6,13 +6,4 @@
 #define BOOST_TEST_MAIN 1
 #define BOOST_TEST_DYN_LINK 1
 
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
-#endif // __clang__
-
-#include <boost/test/unit_test.hpp>
-
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif // __clang__
+#include "boost-test.hpp"
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()
diff --git a/tests/security/identity-fixture.cpp b/tests/security/identity-fixture.cpp
index 899f5de..a39ecbe 100644
--- a/tests/security/identity-fixture.cpp
+++ b/tests/security/identity-fixture.cpp
@@ -6,16 +6,7 @@
 
 #include "security/key-chain.hpp"
 
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
-#endif // __clang__
-
-#include <boost/test/unit_test.hpp>
-
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif // __clang__
+#include "boost-test.hpp"
 
 namespace ndn {
 
diff --git a/tests/security/test-certificate-cache.cpp b/tests/security/test-certificate-cache.cpp
index ee7fd6f..d259e28 100644
--- a/tests/security/test-certificate-cache.cpp
+++ b/tests/security/test-certificate-cache.cpp
@@ -4,11 +4,11 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-#include <unistd.h>
 #include "security/certificate-cache-ttl.hpp"
 #include "face.hpp"
 
+#include "boost-test.hpp"
+
 using namespace std;
 
 namespace ndn {
@@ -39,7 +39,7 @@
 
   Name name1 = certName1.getPrefix(-1);
   Name name2 = certName2.getPrefix(-1);
-  
+
   cache->insertCertificate(cert1);
   cache->insertCertificate(cert2);
 
diff --git a/tests/security/test-encode-decode-certificate.cpp b/tests/security/test-encode-decode-certificate.cpp
index 05c310c..b9d8d36 100644
--- a/tests/security/test-encode-decode-certificate.cpp
+++ b/tests/security/test-encode-decode-certificate.cpp
@@ -3,15 +3,12 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "security/certificate.hpp"
 #include "security/public-key.hpp"
 
 #include "security/cryptopp.hpp"
 
-#include <fstream>
-#include <boost/test/output_test_stream.hpp>
+#include "boost-test.hpp"
 
 using namespace std;
 namespace ndn {
diff --git a/tests/security/test-keychain.cpp b/tests/security/test-keychain.cpp
index 8a76b79..00e848a 100644
--- a/tests/security/test-keychain.cpp
+++ b/tests/security/test-keychain.cpp
@@ -4,10 +4,10 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "security/key-chain.hpp"
 
+#include "boost-test.hpp"
+
 using namespace std;
 
 namespace ndn {
@@ -21,7 +21,7 @@
   Name identity("/TestKeyChain/ExportIdentity/");
   identity.appendVersion();
   keyChain.createIdentity(identity);
-  
+
   shared_ptr<SecuredBag> exported = keyChain.exportIdentity(identity, "1234");
 
   Block block = exported->wireEncode();
@@ -59,7 +59,7 @@
 BOOST_AUTO_TEST_CASE (PrepareIdentityCertificate)
 {
   KeyChainImpl<SecPublicInfoSqlite3, SecTpmFile> keyChain;
-  
+
   Name identity("/TestKeyChain/PrepareIdentityCertificate/");
   identity.appendVersion();
   keyChain.createIdentity(identity);
@@ -105,7 +105,7 @@
 						  time::system_clock::now() + time::days(365),
 						  subjectDescription);
   BOOST_CHECK(!static_cast<bool>(idCert4));
-  
+
 
   Name wrongKeyName3("/TestKeyChain/PrepareIdentityCertificate/ksk-1234");
   shared_ptr<IdentityCertificate> idCert5
diff --git a/tests/security/test-sec-public-info-sqlite3.cpp b/tests/security/test-sec-public-info-sqlite3.cpp
index c50183d..52ae0ec 100644
--- a/tests/security/test-sec-public-info-sqlite3.cpp
+++ b/tests/security/test-sec-public-info-sqlite3.cpp
@@ -4,15 +4,11 @@
  * See COPYING for copyright and distribution information.
  */
 
-#if __clang__
-#pragma clang diagnostic ignored "-Wtautological-compare"
-#endif
-
-#include <boost/test/unit_test.hpp>
-
 #include "security/key-chain.hpp"
 #include "util/time.hpp"
 
+#include "boost-test.hpp"
+
 using namespace std;
 namespace ndn {
 
@@ -28,18 +24,18 @@
   Name certName1;
   BOOST_REQUIRE_NO_THROW(certName1 = keyChain.createIdentity(identity));
 
-  Name keyName1 = IdentityCertificate::certificateNameToPublicKeyName(certName1);  
+  Name keyName1 = IdentityCertificate::certificateNameToPublicKeyName(certName1);
   Name keyName2;
   BOOST_REQUIRE_NO_THROW(keyName2 = keyChain.generateRSAKeyPairAsDefault(identity));
-  
+
   shared_ptr<IdentityCertificate> cert2;
   BOOST_REQUIRE_NO_THROW(cert2 = keyChain.selfSign(keyName2));
   Name certName2 = cert2->getName();
   BOOST_REQUIRE_NO_THROW(keyChain.addCertificateAsKeyDefault(*cert2));
-  
+
   Name keyName3;
   BOOST_REQUIRE_NO_THROW(keyName3 = keyChain.generateRSAKeyPairAsDefault(identity));
-  
+
   shared_ptr<IdentityCertificate> cert3;
   BOOST_REQUIRE_NO_THROW(cert3 = keyChain.selfSign(keyName3));
   Name certName3 = cert3->getName();
diff --git a/tests/security/test-sec-tpm-file.cpp b/tests/security/test-sec-tpm-file.cpp
index 056fedf..1ef4ad4 100644
--- a/tests/security/test-sec-tpm-file.cpp
+++ b/tests/security/test-sec-tpm-file.cpp
@@ -4,12 +4,12 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "security/key-chain.hpp"
 #include "util/time.hpp"
 #include "security/cryptopp.hpp"
 
+#include "boost-test.hpp"
+
 using namespace std;
 namespace ndn {
 
@@ -18,15 +18,15 @@
 BOOST_AUTO_TEST_CASE (Delete)
 {
   SecTpmFile tpm;
-  
+
   Name keyName("/TestSecTpmFile/Delete/ksk-" + boost::lexical_cast<string>(time::toUnixTimestamp(time::system_clock::now())));
   BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048));
-  
+
   BOOST_REQUIRE_EQUAL(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PUBLIC), true);
   BOOST_REQUIRE_EQUAL(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PRIVATE), true);
-  
+
   tpm.deleteKeyPairInTpm(keyName);
-  
+
   BOOST_REQUIRE_EQUAL(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PUBLIC), false);
   BOOST_REQUIRE_EQUAL(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PRIVATE), false);
 }
@@ -37,7 +37,7 @@
 
   Name keyName("/TestSecTpmFile/SignVerify/ksk-" + boost::lexical_cast<string>(time::toUnixTimestamp(time::system_clock::now())));
   BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048));
-  
+
   Data data("/tmp/test/1");
   const uint8_t content[] = {0x01, 0x02, 0x03, 0x04};
 
@@ -49,16 +49,16 @@
   try
     {
       using namespace CryptoPP;
-      
+
       RSA::PublicKey publicKey;
       ByteQueue queue;
       queue.Put(reinterpret_cast<const byte*>(pubkeyPtr->get().buf()), pubkeyPtr->get().size());
       publicKey.Load(queue);
-      
+
       RSASS<PKCS1v15, SHA256>::Verifier verifier (publicKey);
       bool result = verifier.VerifyMessage(content, sizeof(content),
 					   sigBlock.value(), sigBlock.value_size());
-      
+
       BOOST_CHECK_EQUAL(result, true);
     }
   catch(CryptoPP::Exception& e)
@@ -106,7 +106,7 @@
 
   BOOST_REQUIRE(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PRIVATE) == false);
   BOOST_REQUIRE(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PUBLIC) == false);
-  
+
   BOOST_REQUIRE_NO_THROW(tpm.importPrivateKeyPkcs8IntoTpm(keyName, reinterpret_cast<const uint8_t*>(decoded.c_str()), decoded.size(), "1234"));
 
   BOOST_REQUIRE(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PRIVATE) == true);
@@ -122,16 +122,16 @@
   try
     {
       using namespace CryptoPP;
-      
+
       RSA::PublicKey publicKey;
       ByteQueue queue;
       queue.Put(reinterpret_cast<const byte*>(pubkeyPtr->get().buf()), pubkeyPtr->get().size());
       publicKey.Load(queue);
-      
+
       RSASS<PKCS1v15, SHA256>::Verifier verifier (publicKey);
       bool result = verifier.VerifyMessage(content, sizeof(content),
 					   sigBlock.value(), sigBlock.value_size());
-      
+
       BOOST_CHECK_EQUAL(result, true);
     }
   catch(CryptoPP::Exception& e)
@@ -148,10 +148,10 @@
   BOOST_REQUIRE(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PUBLIC) == false);
 
   BOOST_REQUIRE(tpm.importPrivateKeyPkcs8IntoTpm(keyName, exported->buf(), exported->size(), "5678"));
-  
+
   BOOST_REQUIRE(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PRIVATE) == true);
   BOOST_REQUIRE(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PUBLIC) == true);
-  
+
   const uint8_t content2[] = {0x05, 0x06, 0x07, 0x08};
   Block sigBlock2;
   BOOST_CHECK_NO_THROW(sigBlock2 = tpm.signInTpm(content2, sizeof(content2), keyName, DIGEST_ALGORITHM_SHA256));
@@ -159,7 +159,7 @@
   try
     {
       using namespace CryptoPP;
-      
+
       RSA::PublicKey publicKey;
       ByteQueue queue;
       queue.Put(reinterpret_cast<const byte*>(pubkeyPtr->get().buf()), pubkeyPtr->get().size());
@@ -168,14 +168,14 @@
       RSASS<PKCS1v15, SHA256>::Verifier verifier (publicKey);
       bool result = verifier.VerifyMessage(content2, sizeof(content2),
 					   sigBlock2.value(), sigBlock2.value_size());
-  
+
       BOOST_CHECK_EQUAL(result, true);
     }
   catch(CryptoPP::Exception& e)
     {
       BOOST_CHECK(false);
     }
-  
+
   tpm.deleteKeyPairInTpm(keyName);
 
   BOOST_REQUIRE(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PRIVATE) == false);
diff --git a/tests/security/test-sec-tpm-osx.cpp b/tests/security/test-sec-tpm-osx.cpp
index 941b06d..1ae9996 100644
--- a/tests/security/test-sec-tpm-osx.cpp
+++ b/tests/security/test-sec-tpm-osx.cpp
@@ -4,12 +4,12 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "security/key-chain.hpp"
 #include "util/time.hpp"
 #include "security/cryptopp.hpp"
 
+#include "boost-test.hpp"
+
 using namespace std;
 namespace ndn {
 
@@ -18,16 +18,16 @@
 BOOST_AUTO_TEST_CASE (Delete)
 {
   SecTpmOsx tpm;
-  
+
   Name keyName("/TestSecTpmOsx/Delete/ksk-" + boost::lexical_cast<string>(
                                                 time::toUnixTimestamp(time::system_clock::now()).count()));
   BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048));
-  
+
   BOOST_REQUIRE_EQUAL(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PUBLIC), true);
   BOOST_REQUIRE_EQUAL(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PRIVATE), true);
-  
+
   tpm.deleteKeyPairInTpm(keyName);
-  
+
   BOOST_REQUIRE_EQUAL(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PUBLIC), false);
   BOOST_REQUIRE_EQUAL(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PRIVATE), false);
 }
@@ -39,7 +39,7 @@
   Name keyName("/TestSecTpmOsx/SignVerify/ksk-" + boost::lexical_cast<string>(
                                                     time::toUnixTimestamp(time::system_clock::now()).count()));
   BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048));
-  
+
   Data data("/TestSecTpmOsx/SignVaerify/Data/1");
   const uint8_t content[] = {0x01, 0x02, 0x03, 0x04};
 
@@ -60,7 +60,7 @@
       RSASS<PKCS1v15, SHA256>::Verifier verifier (publicKey);
       bool result = verifier.VerifyMessage(content, sizeof(content),
 					   sigBlock.value(), sigBlock.value_size());
-  
+
       BOOST_CHECK_EQUAL(result, true);
     }
   catch(CryptoPP::Exception& e)
@@ -100,7 +100,7 @@
 
   Name keyName("/TestSecTpmOsx/ExportImportKey/ksk-" + boost::lexical_cast<string>(
                                                          time::toUnixTimestamp(time::system_clock::now()).count()));
-  
+
   BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048));
 
   BOOST_REQUIRE(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PRIVATE) == true);
@@ -117,7 +117,7 @@
   BOOST_REQUIRE(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PUBLIC) == false);
 
   BOOST_REQUIRE(tpm.importPrivateKeyPkcs8IntoTpm(keyName, exported->buf(), exported->size(), "1234"));
-  
+
   BOOST_REQUIRE(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PUBLIC) == true);
   BOOST_REQUIRE(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PRIVATE) == true);
 
@@ -137,14 +137,14 @@
       RSASS<PKCS1v15, SHA256>::Verifier verifier (publicKey);
       bool result = verifier.VerifyMessage(content, sizeof(content),
 					   sigBlock.value(), sigBlock.value_size());
-      
+
       BOOST_CHECK_EQUAL(result, true);
     }
   catch(CryptoPP::Exception& e)
     {
       BOOST_CHECK(false);
     }
-  
+
   tpm.deleteKeyPairInTpm(keyName);
   // This is some problem related to Mac OS Key chain, and we will fix it later.
   // BOOST_REQUIRE(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PRIVATE) == false);
diff --git a/tests/security/test-signature-sha256.cpp b/tests/security/test-signature-sha256.cpp
index daf359b..a5450b9 100644
--- a/tests/security/test-signature-sha256.cpp
+++ b/tests/security/test-signature-sha256.cpp
@@ -4,13 +4,13 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "security/key-chain.hpp"
 #include "security/validator.hpp"
 
 #include "security/cryptopp.hpp"
 
+#include "boost-test.hpp"
+
 using namespace std;
 namespace ndn {
 
@@ -38,14 +38,14 @@
   Data testData(name);
   char content[5] = "1234";
   testData.setContent(reinterpret_cast<uint8_t*>(content), 5);
-  
+
   KeyChainImpl<SecPublicInfoSqlite3, SecTpmFile> keychain;
   keychain.signWithSha256(testData);
 
   testData.wireEncode();
 
   SignatureSha256 sig(testData.getSignature());
-  
+
   BOOST_REQUIRE(Validator::verifySignature(testData, sig));
 }
 
diff --git a/tests/security/test-signed-interest.cpp b/tests/security/test-signed-interest.cpp
index db051c3..b870fb1 100644
--- a/tests/security/test-signed-interest.cpp
+++ b/tests/security/test-signed-interest.cpp
@@ -4,14 +4,14 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "security/key-chain.hpp"
 #include "security/validator.hpp"
 
 #include "util/command-interest-generator.hpp"
 #include "util/command-interest-validator.hpp"
 
+#include "boost-test.hpp"
+
 using namespace std;
 namespace ndn {
 
diff --git a/tests/security/test-validator.cpp b/tests/security/test-validator.cpp
index c909c06..6e9ce4c 100644
--- a/tests/security/test-validator.cpp
+++ b/tests/security/test-validator.cpp
@@ -4,12 +4,11 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "security/validator-null.hpp"
 #include "security/key-chain.hpp"
 #include "util/time.hpp"
 
+#include "boost-test.hpp"
 
 using namespace std;
 
@@ -23,8 +22,8 @@
 
 void
 onValidationFailed(const shared_ptr<const Data>& data, const string& failureInfo)
-{ 
-  BOOST_CHECK(false); 
+{
+  BOOST_CHECK(false);
 }
 
 BOOST_AUTO_TEST_CASE (Null)
@@ -41,7 +40,7 @@
   shared_ptr<Data> data = make_shared<Data>(dataName);
 
   BOOST_CHECK_NO_THROW(keyChain.signByIdentity(*data, identity));
-  
+
   ValidatorNull validator;
 
   // data must be a shared pointer
diff --git a/tests/test-all.hpp b/tests/test-all.hpp
index 0e4c8c5..4b5e1a8 100644
--- a/tests/test-all.hpp
+++ b/tests/test-all.hpp
@@ -1,10 +1,12 @@
 /**
- * Copyright (C) 2013 Regents of the University of California.
+ * Copyright (C) 2014 Regents of the University of California.
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_TEST_ALL_HPP
-#define NDN_TEST_ALL_HPP
+// This file is needed for experimental precompiled header support (gcc and clang)
+
+#ifndef NDN_TESTS_TEST_ALL_HPP
+#define NDN_TESTS_TEST_ALL_HPP
 
 #include "common.hpp"
 
diff --git a/tests/test-block.cpp b/tests/test-block.cpp
index 1c7557d..c0b9671 100644
--- a/tests/test-block.cpp
+++ b/tests/test-block.cpp
@@ -5,8 +5,7 @@
 
 #include "encoding/encoding-buffer.hpp"
 
-#include <boost/test/unit_test.hpp>
-#include <boost/concept_check.hpp>
+#include "boost-test.hpp"
 
 using namespace std;
 namespace ndn {
diff --git a/tests/test-data.cpp b/tests/test-data.cpp
index 0034ffa..30d39df 100644
--- a/tests/test-data.cpp
+++ b/tests/test-data.cpp
@@ -3,15 +3,12 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "data.hpp"
 #include "security/key-chain.hpp"
-
-#include <fstream>
-
 #include "security/cryptopp.hpp"
 
+#include "boost-test.hpp"
+
 using namespace std;
 namespace ndn {
 
@@ -20,29 +17,29 @@
 const uint8_t Content1[] = {0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x21};
 
 const uint8_t Data1[] = {
-0x06, 0xc5, // NDN Data                           
-    0x07, 0x14, // Name                           
-        0x08, 0x05,    
+0x06, 0xc5, // NDN Data
+    0x07, 0x14, // Name
+        0x08, 0x05,
             0x6c, 0x6f, 0x63, 0x61, 0x6c,
-        0x08, 0x03,    
+        0x08, 0x03,
             0x6e, 0x64, 0x6e,
-        0x08, 0x06,    
+        0x08, 0x06,
             0x70, 0x72, 0x65, 0x66, 0x69, 0x78,
     0x14, 0x04, // MetaInfo
         0x19, 0x02, // FreshnessPeriod
-            0x27, 0x10,               
-    0x15, 0x08, // Content            
+            0x27, 0x10,
+    0x15, 0x08, // Content
         0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x21,
     0x16, 0x1b, // SignatureInfo
         0x1b, 0x01, // SignatureType
-            0x01,                   
+            0x01,
         0x1c, 0x16, // KeyLocator
-            0x07, 0x14, // Name  
-                0x08, 0x04,    
+            0x07, 0x14, // Name
+                0x08, 0x04,
                     0x74, 0x65, 0x73, 0x74,
-                0x08, 0x03,    
+                0x08, 0x03,
                     0x6b, 0x65, 0x79,
-                0x08, 0x07,    
+                0x08, 0x07,
                     0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72,
     0x17, 0x80, // SignatureValue
         0x2f, 0xd6, 0xf1, 0x6e, 0x80, 0x6f, 0x10, 0xbe, 0xb1, 0x6f, 0x3e, 0x31, 0xec, 0xe3, 0xb9, 0xea, 0x83, 0x30, 0x40, 0x03, 0xfc, 0xa0, 0x13, 0xd9, 0xb3, 0xc6, 0x25, 0x16, 0x2d, 0xa6, 0x58, 0x41, 0x69, 0x62, 0x56, 0xd8, 0xb3, 0x6a, 0x38, 0x76, 0x56, 0xea, 0x61, 0xb2, 0x32, 0x70, 0x1c, 0xb6, 0x4d, 0x10, 0x1d, 0xdc, 0x92, 0x8e, 0x52, 0xa5, 0x8a, 0x1d, 0xd9, 0x96, 0x5e, 0xc0, 0x62, 0x0b, 0xcf, 0x3a, 0x9d, 0x7f, 0xca, 0xbe, 0xa1, 0x41, 0x71, 0x85, 0x7a, 0x8b, 0x5d, 0xa9, 0x64, 0xd6, 0x66, 0xb4, 0xe9, 0x8d, 0x0c, 0x28, 0x43, 0xee, 0xa6, 0x64, 0xe8, 0x55, 0xf6, 0x1c, 0x19, 0x0b, 0xef, 0x99, 0x25, 0x1e, 0xdc, 0x78, 0xb3, 0xa7, 0xaa, 0x0d, 0x14, 0x58, 0x30, 0xe5, 0x37, 0x6a, 0x6d, 0xdb, 0x56, 0xac, 0xa3, 0xfc, 0x90, 0x7a, 0xb8, 0x66, 0x9c, 0x0e, 0xf6, 0xb7, 0x64, 0xd1
@@ -109,7 +106,7 @@
 BOOST_FIXTURE_TEST_CASE (Decode, TestDataFixture)
 {
   Block dataBlock(Data1, sizeof(Data1));
-  
+
   ndn::Data d;
   // BOOST_REQUIRE_NO_THROW
     (d.wireDecode(dataBlock));
@@ -125,10 +122,10 @@
   block.parse();
   KeyLocator keyLocator;
   BOOST_REQUIRE_NO_THROW(keyLocator.wireDecode(block.get(Tlv::KeyLocator)));
-  
+
   BOOST_REQUIRE_EQUAL(keyLocator.getName().toUri(), "/test/key/locator");
 
-  using namespace CryptoPP;  
+  using namespace CryptoPP;
   RSASS<PKCS1v15, SHA256>::Verifier verifier(publicKey_);
   bool signatureVerified = verifier.VerifyMessage(d.wireEncode().value(), d.wireEncode().value_size() - d.getSignature().getValue().size(),
                                                   d.getSignature().getValue().value(), d.getSignature().getValue().value_size());
@@ -138,11 +135,11 @@
 BOOST_FIXTURE_TEST_CASE (Encode, TestDataFixture)
 {
   // manual data packet creation for now
-  
+
   ndn::Data d(ndn::Name("/local/ndn/prefix"));
   d.setContentType(MetaInfo::TYPE_DEFAULT);
   d.setFreshnessPeriod(time::seconds(10));
-  
+
   d.setContent(Content1, sizeof(Content1));
 
   Block signatureInfo(Tlv::SignatureInfo);
@@ -155,7 +152,7 @@
   {
     KeyLocator keyLocator;
     keyLocator.setName("/test/key/locator");
-    
+
     signatureInfo.push_back(keyLocator.wireEncode());
   }
   signatureInfo.encode();
@@ -165,7 +162,7 @@
   Tlv::writeVarNumber(os, Tlv::SignatureValue);
 
   using namespace CryptoPP;
-  
+
   RSASS<PKCS1v15, SHA256>::Signer signer(privateKey_);
 
   PK_MessageAccumulator *hash = signer.NewSignatureAccumulator(rng_);
@@ -173,7 +170,7 @@
   hash->Update(d.getMetaInfo().wireEncode().wire(), d.getMetaInfo().wireEncode().size());
   hash->Update(d.getContent().              wire(), d.getContent().              size());
   hash->Update(signatureInfo.               wire(), signatureInfo.               size());
-  
+
   size_t length = signer.MaxSignatureLength();
   SecByteBlock buf(length);
   signer.Sign(rng_, hash, buf);
@@ -182,7 +179,7 @@
   os.write(reinterpret_cast<const char *> (buf.BytePtr()), buf.size());
 
   ndn::Block signatureValue (Block(os.buf()));
-  
+
   Signature signature(signatureInfo, signatureValue);
 
   d.setSignature(signature);
@@ -208,11 +205,11 @@
   BOOST_REQUIRE_NO_THROW(meta.wireEncode());
   BOOST_REQUIRE_EQUAL_COLLECTIONS(MetaInfo2, MetaInfo2+sizeof(MetaInfo2),
                                   meta.wireEncode().begin(), meta.wireEncode().end());
-  
+
   meta.setType(MetaInfo::TYPE_LINK);
   BOOST_REQUIRE_NO_THROW(meta.wireEncode());
   BOOST_REQUIRE_EQUAL_COLLECTIONS(MetaInfo3, MetaInfo3+sizeof(MetaInfo3),
-                                  meta.wireEncode().begin(), meta.wireEncode().end()); 
+                                  meta.wireEncode().begin(), meta.wireEncode().end());
 }
 
 BOOST_AUTO_TEST_CASE (DecodeMetaInfo)
diff --git a/tests/test-exclude.cpp b/tests/test-exclude.cpp
index 033fdea..296d9ab 100644
--- a/tests/test-exclude.cpp
+++ b/tests/test-exclude.cpp
@@ -5,41 +5,41 @@
 
 #include "exclude.hpp"
 
-#include <boost/test/unit_test.hpp>
+#include "boost-test.hpp"
 
 namespace ndn {
 
 BOOST_AUTO_TEST_SUITE(TestExclude)
 
-BOOST_AUTO_TEST_CASE (Basic)
+BOOST_AUTO_TEST_CASE(Basic)
 {
   Exclude e;
-  e.excludeOne (name::Component("b"));
-  BOOST_CHECK_EQUAL (e.size (), 1);
-  BOOST_CHECK_EQUAL (e.toUri(), "b");
+  e.excludeOne(name::Component("b"));
+  BOOST_CHECK_EQUAL(e.size(), 1);
+  BOOST_CHECK_EQUAL(e.toUri(), "b");
 
-  e.excludeOne (name::Component("d"));
-  BOOST_CHECK_EQUAL (e.size (), 2);
-  BOOST_CHECK_EQUAL (e.toUri(), "b,d");
+  e.excludeOne(name::Component("d"));
+  BOOST_CHECK_EQUAL(e.size(), 2);
+  BOOST_CHECK_EQUAL(e.toUri(), "b,d");
 
-  e.excludeOne (name::Component("a"));
-  BOOST_CHECK_EQUAL (e.size (), 3);
-  BOOST_CHECK_EQUAL (e.toUri(), "a,b,d");
+  e.excludeOne(name::Component("a"));
+  BOOST_CHECK_EQUAL(e.size(), 3);
+  BOOST_CHECK_EQUAL(e.toUri(), "a,b,d");
 
-  e.excludeOne (name::Component("aa"));
-  BOOST_CHECK_EQUAL (e.size (), 4);
-  BOOST_CHECK_EQUAL (e.toUri(), "a,b,d,aa");
+  e.excludeOne(name::Component("aa"));
+  BOOST_CHECK_EQUAL(e.size(), 4);
+  BOOST_CHECK_EQUAL(e.toUri(), "a,b,d,aa");
 
-  e.excludeOne (name::Component("cc"));
-  BOOST_CHECK_EQUAL (e.size (), 5);
-  BOOST_CHECK_EQUAL (e.toUri(), "a,b,d,aa,cc");
+  e.excludeOne(name::Component("cc"));
+  BOOST_CHECK_EQUAL(e.size(), 5);
+  BOOST_CHECK_EQUAL(e.toUri(), "a,b,d,aa,cc");
 
-  e.excludeOne (name::Component("c"));
-  BOOST_CHECK_EQUAL (e.size (), 6);
-  BOOST_CHECK_EQUAL (e.toUri(), "a,b,c,d,aa,cc");
+  e.excludeOne(name::Component("c"));
+  BOOST_CHECK_EQUAL(e.size(), 6);
+  BOOST_CHECK_EQUAL(e.toUri(), "a,b,c,d,aa,cc");
 }
 
-BOOST_AUTO_TEST_CASE (Before)
+BOOST_AUTO_TEST_CASE(Before)
 {
   // based on http://redmine.named-data.net/issues/1158
   ndn::Exclude e;
@@ -48,56 +48,56 @@
   BOOST_CHECK_EQUAL(e.toUri(), "*,PuQxMaf91");
 }
 
-BOOST_AUTO_TEST_CASE (Ranges)
+BOOST_AUTO_TEST_CASE(Ranges)
 {
 // example: ANY /b /d ANY /f
 
   Exclude e;
-  e.excludeOne (name::Component ("b0"));
-  BOOST_CHECK_EQUAL (e.size (), 1);
-  BOOST_CHECK_EQUAL (e.toUri(), "b0");
+  e.excludeOne(name::Component("b0"));
+  BOOST_CHECK_EQUAL(e.size(), 1);
+  BOOST_CHECK_EQUAL(e.toUri(), "b0");
 
-  e.excludeRange (name::Component (), name::Component ("b1"));
-  BOOST_CHECK_EQUAL (e.size (), 2);
-  BOOST_CHECK_EQUAL (e.toUri(), "*,b1");
+  e.excludeRange(name::Component(), name::Component("b1"));
+  BOOST_CHECK_EQUAL(e.size(), 2);
+  BOOST_CHECK_EQUAL(e.toUri(), "*,b1");
 
-  e.excludeRange (name::Component (), name::Component("c0"));
-  BOOST_CHECK_EQUAL (e.size (), 2);
-  BOOST_CHECK_EQUAL (e.toUri(), "*,c0");
+  e.excludeRange(name::Component(), name::Component("c0"));
+  BOOST_CHECK_EQUAL(e.size(), 2);
+  BOOST_CHECK_EQUAL(e.toUri(), "*,c0");
 
-  e.excludeRange (name::Component("a0"), name::Component("c0"));
-  BOOST_CHECK_EQUAL (e.size (), 2);
-  BOOST_CHECK_EQUAL (e.toUri(), "*,c0");
+  e.excludeRange(name::Component("a0"), name::Component("c0"));
+  BOOST_CHECK_EQUAL(e.size(), 2);
+  BOOST_CHECK_EQUAL(e.toUri(), "*,c0");
 
-  e.excludeRange (name::Component("d0"), name::Component("e0"));
-  BOOST_CHECK_EQUAL (e.size (), 4);
-  BOOST_CHECK_EQUAL (e.toUri(), "*,c0,d0,*,e0");
+  e.excludeRange(name::Component("d0"), name::Component("e0"));
+  BOOST_CHECK_EQUAL(e.size(), 4);
+  BOOST_CHECK_EQUAL(e.toUri(), "*,c0,d0,*,e0");
 
-  e.excludeRange (name::Component("c1"), name::Component("d1"));
-  BOOST_CHECK_EQUAL (e.size (), 4);
-  BOOST_CHECK_EQUAL (e.toUri(), "*,c0,c1,*,e0");
+  e.excludeRange(name::Component("c1"), name::Component("d1"));
+  BOOST_CHECK_EQUAL(e.size(), 4);
+  BOOST_CHECK_EQUAL(e.toUri(), "*,c0,c1,*,e0");
 
-  e.excludeRange (name::Component("a1"), name::Component("d1"));
-  BOOST_CHECK_EQUAL (e.size (), 2);
-  BOOST_CHECK_EQUAL (e.toUri(), "*,e0");
+  e.excludeRange(name::Component("a1"), name::Component("d1"));
+  BOOST_CHECK_EQUAL(e.size(), 2);
+  BOOST_CHECK_EQUAL(e.toUri(), "*,e0");
 
-  e.excludeBefore (name::Component("e2"));
-  BOOST_CHECK_EQUAL (e.size (), 2);
-  BOOST_CHECK_EQUAL (e.toUri(), "*,e2");
+  e.excludeBefore(name::Component("e2"));
+  BOOST_CHECK_EQUAL(e.size(), 2);
+  BOOST_CHECK_EQUAL(e.toUri(), "*,e2");
 
-  e.excludeAfter (name::Component("f0"));
-  BOOST_CHECK_EQUAL (e.size (), 3);
-  BOOST_CHECK_EQUAL (e.toUri(), "*,e2,f0,*");
+  e.excludeAfter(name::Component("f0"));
+  BOOST_CHECK_EQUAL(e.size(), 3);
+  BOOST_CHECK_EQUAL(e.toUri(), "*,e2,f0,*");
 
-  e.excludeAfter (name::Component("e5"));
-  BOOST_CHECK_EQUAL (e.size (), 3);
-  BOOST_CHECK_EQUAL (e.toUri(), "*,e2,e5,*");
+  e.excludeAfter(name::Component("e5"));
+  BOOST_CHECK_EQUAL(e.size(), 3);
+  BOOST_CHECK_EQUAL(e.toUri(), "*,e2,e5,*");
 
-  e.excludeAfter (name::Component("b2"));
-  BOOST_CHECK_EQUAL (e.size (), 1);
-  BOOST_CHECK_EQUAL (e.toUri(), "*");
+  e.excludeAfter(name::Component("b2"));
+  BOOST_CHECK_EQUAL(e.size(), 1);
+  BOOST_CHECK_EQUAL(e.toUri(), "*");
 
-  BOOST_REQUIRE_THROW (e.excludeRange (name::Component("d0"), name::Component("a0")), Exclude::Error);
+  BOOST_REQUIRE_THROW(e.excludeRange(name::Component("d0"), name::Component("a0")), Exclude::Error);
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/test-interest.cpp b/tests/test-interest.cpp
index 321685e..3da58ec 100644
--- a/tests/test-interest.cpp
+++ b/tests/test-interest.cpp
@@ -8,7 +8,7 @@
 #include "security/signature-sha256-with-rsa.hpp"
 #include "security/signature-sha256.hpp"
 
-#include <boost/test/unit_test.hpp>
+#include "boost-test.hpp"
 
 using namespace std;
 namespace ndn {
@@ -65,48 +65,48 @@
   0x01
 };
 
-BOOST_AUTO_TEST_CASE (Decode)
+BOOST_AUTO_TEST_CASE(Decode)
 {
   Block interestBlock(Interest1, sizeof(Interest1));
 
   ndn::Interest i;
   BOOST_REQUIRE_NO_THROW(i.wireDecode(interestBlock));
 
-  BOOST_REQUIRE_EQUAL(i.getName().toUri(), "/local/ndn/prefix");
-  BOOST_REQUIRE_EQUAL(i.getScope(), 1);
-  BOOST_REQUIRE_EQUAL(i.getInterestLifetime(), time::milliseconds(1000));
-  BOOST_REQUIRE_EQUAL(i.getMinSuffixComponents(), 1);
-  BOOST_REQUIRE_EQUAL(i.getMaxSuffixComponents(), 1);
-  BOOST_REQUIRE_EQUAL(i.getPublisherPublicKeyLocator().getType(),
-                      static_cast<uint32_t>(KeyLocator::KeyLocator_Name));
-  BOOST_REQUIRE_EQUAL(i.getPublisherPublicKeyLocator().getName(), "ndn:/test/key/locator");
-  BOOST_REQUIRE_EQUAL(i.getChildSelector(), 1);
-  BOOST_REQUIRE_EQUAL(i.getMustBeFresh(), false);
-  BOOST_REQUIRE_EQUAL(i.getExclude().toUri(), "alex,xxxx,*,yyyy");
-  BOOST_REQUIRE_EQUAL(i.getNonce(), 1);
+  BOOST_CHECK_EQUAL(i.getName().toUri(), "/local/ndn/prefix");
+  BOOST_CHECK_EQUAL(i.getScope(), 1);
+  BOOST_CHECK_EQUAL(i.getInterestLifetime(), time::milliseconds(1000));
+  BOOST_CHECK_EQUAL(i.getMinSuffixComponents(), 1);
+  BOOST_CHECK_EQUAL(i.getMaxSuffixComponents(), 1);
+  BOOST_CHECK_EQUAL(i.getPublisherPublicKeyLocator().getType(),
+                    static_cast<uint32_t>(KeyLocator::KeyLocator_Name));
+  BOOST_CHECK_EQUAL(i.getPublisherPublicKeyLocator().getName(), "ndn:/test/key/locator");
+  BOOST_CHECK_EQUAL(i.getChildSelector(), 1);
+  BOOST_CHECK_EQUAL(i.getMustBeFresh(), false);
+  BOOST_CHECK_EQUAL(i.getExclude().toUri(), "alex,xxxx,*,yyyy");
+  BOOST_CHECK_EQUAL(i.getNonce(), 1U);
 }
 
-BOOST_AUTO_TEST_CASE (DecodeFromStream)
+BOOST_AUTO_TEST_CASE(DecodeFromStream)
 {
-  boost::iostreams::stream<boost::iostreams::array_source> is (reinterpret_cast<const char *>(Interest1), sizeof(Interest1));
+  boost::iostreams::stream<boost::iostreams::array_source> is(reinterpret_cast<const char *>(Interest1), sizeof(Interest1));
 
   Block interestBlock(is);
 
   ndn::Interest i;
   BOOST_REQUIRE_NO_THROW(i.wireDecode(interestBlock));
 
-  BOOST_REQUIRE_EQUAL(i.getName().toUri(), "/local/ndn/prefix");
-  BOOST_REQUIRE_EQUAL(i.getScope(), 1);
-  BOOST_REQUIRE_EQUAL(i.getInterestLifetime(), time::milliseconds(1000));
-  BOOST_REQUIRE_EQUAL(i.getMinSuffixComponents(), 1);
-  BOOST_REQUIRE_EQUAL(i.getMaxSuffixComponents(), 1);
-  BOOST_REQUIRE_EQUAL(i.getChildSelector(), 1);
-  BOOST_REQUIRE_EQUAL(i.getMustBeFresh(), false);
-  BOOST_REQUIRE_EQUAL(i.getExclude().toUri(), "alex,xxxx,*,yyyy");
-  BOOST_REQUIRE_EQUAL(i.getNonce(), 1);
+  BOOST_CHECK_EQUAL(i.getName().toUri(), "/local/ndn/prefix");
+  BOOST_CHECK_EQUAL(i.getScope(), 1);
+  BOOST_CHECK_EQUAL(i.getInterestLifetime(), time::milliseconds(1000));
+  BOOST_CHECK_EQUAL(i.getMinSuffixComponents(), 1);
+  BOOST_CHECK_EQUAL(i.getMaxSuffixComponents(), 1);
+  BOOST_CHECK_EQUAL(i.getChildSelector(), 1);
+  BOOST_CHECK_EQUAL(i.getMustBeFresh(), false);
+  BOOST_CHECK_EQUAL(i.getExclude().toUri(), "alex,xxxx,*,yyyy");
+  BOOST_CHECK_EQUAL(i.getNonce(), 1U);
 }
 
-BOOST_AUTO_TEST_CASE (Encode)
+BOOST_AUTO_TEST_CASE(Encode)
 {
   ndn::Interest i(ndn::Name("/local/ndn/prefix"));
   i.setScope(1);
@@ -125,7 +125,7 @@
 
   const Block &wire = i.wireEncode();
 
-  BOOST_CHECK_EQUAL_COLLECTIONS(Interest1, Interest1+sizeof(Interest1),
+  BOOST_CHECK_EQUAL_COLLECTIONS(Interest1, Interest1 + sizeof(Interest1),
                                 wire.begin(), wire.end());
 }
 
@@ -149,7 +149,7 @@
   BOOST_CHECK_EQUAL(headerBlock.size(), 5);
 
   BOOST_CHECK_EQUAL_COLLECTIONS(InterestWithLocalControlHeader,
-                                InterestWithLocalControlHeader+5,
+                                InterestWithLocalControlHeader + 5,
                                 headerBlock.begin(), headerBlock.end());
 
   interest.setNonce(1000);
@@ -158,14 +158,14 @@
   BOOST_CHECK_EQUAL(updatedHeaderBlock.size(), 5);
 
   // only length should have changed
-  BOOST_CHECK_EQUAL_COLLECTIONS(updatedHeaderBlock.begin()+2, updatedHeaderBlock.end(),
-                                headerBlock.begin()+2,        headerBlock.end());
+  BOOST_CHECK_EQUAL_COLLECTIONS(updatedHeaderBlock.begin() + 2, updatedHeaderBlock.end(),
+                                headerBlock.begin() + 2,        headerBlock.end());
 
   // updating IncomingFaceId that keeps the length
   interest.setIncomingFaceId(100);
   updatedHeaderBlock = interest.getLocalControlHeader().wireEncode(interest, true, true);
   BOOST_CHECK_EQUAL(updatedHeaderBlock.size(), 5);
-  BOOST_CHECK_NE(*(updatedHeaderBlock.begin()+4), *(headerBlock.begin()+4));
+  BOOST_CHECK_NE(*(updatedHeaderBlock.begin() + 4), *(headerBlock.begin() + 4));
 
   // updating IncomingFaceId that increases the length by 2
   interest.setIncomingFaceId(1000);
@@ -191,14 +191,14 @@
 }
 
 
-BOOST_AUTO_TEST_CASE (DecodeWithLocalHeader)
+BOOST_AUTO_TEST_CASE(DecodeWithLocalHeader)
 {
   Block wireBlock(InterestWithLocalControlHeader, sizeof(InterestWithLocalControlHeader));
   const Block& payload = nfd::LocalControlHeader::getPayload(wireBlock);
   BOOST_REQUIRE_NE(&payload, &wireBlock);
 
-  BOOST_CHECK_EQUAL(payload.type(), (uint32_t)Tlv::Interest);
-  BOOST_CHECK_EQUAL(wireBlock.type(), (uint32_t)tlv::nfd::LocalControlHeader);
+  BOOST_CHECK_EQUAL(payload.type(), static_cast<uint32_t>(Tlv::Interest));
+  BOOST_CHECK_EQUAL(wireBlock.type(), static_cast<uint32_t>(tlv::nfd::LocalControlHeader));
 
   Interest interest(payload);
   BOOST_CHECK(!interest.getLocalControlHeader().hasIncomingFaceId());
@@ -226,7 +226,7 @@
   BOOST_CHECK_EQUAL(interest.getLocalControlHeader().wireEncode(interest, true, true).size(), 5);
 }
 
-BOOST_AUTO_TEST_CASE (DecodeWithoutLocalHeader)
+BOOST_AUTO_TEST_CASE(DecodeWithoutLocalHeader)
 {
   Block wireBlock(InterestWithoutLocalControlHeader, sizeof(InterestWithoutLocalControlHeader));
   const Block& payload = nfd::LocalControlHeader::getPayload(wireBlock);
diff --git a/tests/test-name.cpp b/tests/test-name.cpp
index 32e3a10..ba8aa96 100644
--- a/tests/test-name.cpp
+++ b/tests/test-name.cpp
@@ -4,10 +4,10 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "name.hpp"
 
+#include "boost-test.hpp"
+
 namespace ndn {
 
 BOOST_AUTO_TEST_SUITE(TestName)
@@ -25,7 +25,7 @@
 const uint8_t Name1[] = {0x7,  0x7, // Name
                            0x8,  0x5, // NameComponent
                              0x6c,  0x6f,  0x63,  0x61,  0x6c};
-    
+
 const uint8_t Name2[] = {0x7,  0xc, // Name
                            0x8,  0x5, // NameComponent
                              0x6c,  0x6f,  0x63,  0x61,  0x6c,
@@ -61,11 +61,11 @@
   //     if (i != wire.begin())
   //       std::cout << ", ";
   //     std::cout << "0x" << static_cast<uint32_t>(*i);
-      
+
   //     std::cout.flags(saveFlags);
   //   }
   // std::cout << std::endl;
-  
+
   BOOST_CHECK_EQUAL_COLLECTIONS(TestName, TestName+sizeof(TestName),
                                 wire.begin(), wire.end());
 }
@@ -83,12 +83,12 @@
 BOOST_AUTO_TEST_CASE(AppendsAndMultiEncode)
 {
   Name name("/local");
-  
+
   BOOST_CHECK_EQUAL_COLLECTIONS(name.wireEncode().begin(), name.wireEncode().end(),
                                 Name1, Name1 + sizeof(Name1));
 
   name.append("ndn");
-  
+
   BOOST_CHECK_EQUAL_COLLECTIONS(name.wireEncode().begin(), name.wireEncode().end(),
                                 Name2, Name2 + sizeof(Name2));
 
@@ -100,14 +100,14 @@
 BOOST_AUTO_TEST_CASE(AppendNumber)
 {
   Name name;
-  for (int i = 0; i < 10; i++)
+  for (uint32_t i = 0; i < 10; i++)
     {
       name.appendNumber(i);
     }
 
   BOOST_CHECK_EQUAL(name.size(), 10);
 
-  for (int i = 0; i < 10; i++)
+  for (uint32_t i = 0; i < 10; i++)
     {
       BOOST_CHECK_EQUAL(name[i].toNumber(), i);
     }
diff --git a/tests/transport/dummy-face.hpp b/tests/transport/dummy-face.hpp
index 1ac3cc9..134eb72 100644
--- a/tests/transport/dummy-face.hpp
+++ b/tests/transport/dummy-face.hpp
@@ -1,10 +1,10 @@
 /**
- * Copyright (C) 2013 Regents of the University of California.
+ * Copyright (C) 2013-2014 Regents of the University of California.
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_TESTS_DUMMY_FACE_HPP
-#define NDN_TESTS_DUMMY_FACE_HPP
+#ifndef NDN_TESTS_TRANSPORT_DUMMY_FACE_HPP
+#define NDN_TESTS_TRANSPORT_DUMMY_FACE_HPP
 
 #include "face.hpp"
 
@@ -95,4 +95,5 @@
 }
 
 } // namespace ndn
-#endif // NDN_TESTS_DUMMY_FACE_HPP
+
+#endif // NDN_TESTS_TRANSPORT_DUMMY_FACE_HPP
diff --git a/tests/transport/test-unix-transport.cpp b/tests/transport/test-unix-transport.cpp
index ffb0494..535b63c 100644
--- a/tests/transport/test-unix-transport.cpp
+++ b/tests/transport/test-unix-transport.cpp
@@ -4,12 +4,11 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-#include <boost/test/output_test_stream.hpp>
-
 #include "transport/unix-transport.hpp"
 #include "util/config-file.hpp"
 
+#include "boost-test.hpp"
+
 namespace ndn {
 
 class UnixTransportFixture
@@ -63,4 +62,3 @@
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace ndn
-
diff --git a/tests/util/test-config-file.cpp b/tests/util/test-config-file.cpp
index c091ccf..c431e19 100644
--- a/tests/util/test-config-file.cpp
+++ b/tests/util/test-config-file.cpp
@@ -4,12 +4,12 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "util/config-file.hpp"
 
 #include <cstdlib>
 
+#include "boost-test.hpp"
+
 namespace ndn {
 
 class ConfigFileFixture
diff --git a/tests/util/test-io.cpp b/tests/util/test-io.cpp
index 1e8b0bd..c3c247b 100644
--- a/tests/util/test-io.cpp
+++ b/tests/util/test-io.cpp
@@ -3,11 +3,11 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "util/io.hpp"
 #include "security/key-chain.hpp"
 
+#include "boost-test.hpp"
+
 namespace ndn {
 
 BOOST_AUTO_TEST_SUITE(TestIO)
diff --git a/tests/util/test-regex.cpp b/tests/util/test-regex.cpp
index b5d5903..86bad95 100644
--- a/tests/util/test-regex.cpp
+++ b/tests/util/test-regex.cpp
@@ -5,8 +5,6 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "util/regex/regex-backref-manager.hpp"
 #include "util/regex/regex-component-matcher.hpp"
 #include "util/regex/regex-component-set-matcher.hpp"
@@ -16,7 +14,7 @@
 #include "util/regex/regex-top-matcher.hpp"
 #include "util/regex.hpp"
 
-#include <iostream>
+#include "boost-test.hpp"
 
 using namespace std;
 namespace ndn {
@@ -58,11 +56,11 @@
   BOOST_CHECK_EQUAL(res, true);
   BOOST_CHECK_EQUAL(cm->getMatchResult ().size(), 1);
   BOOST_CHECK_EQUAL(cm->getMatchResult ()[0].toEscapedString(), string("a"));
-    
+
   res = cm->match(Name("/a/b/"), 1, 1);
   BOOST_CHECK_EQUAL(res, false);
   BOOST_CHECK_EQUAL(cm->getMatchResult ().size(), 0);
-    
+
   res = cm->match(Name("/a/b/"), 0, 2);
   BOOST_CHECK_EQUAL(res, false);
   BOOST_CHECK_EQUAL(cm->getMatchResult ().size(), 0);
@@ -77,12 +75,12 @@
   res = cm->match(Name("/a/b/d"), 2, 1);
   BOOST_CHECK_EQUAL(res, false);
   BOOST_CHECK_EQUAL(cm->getMatchResult ().size(), 0);
- 
+
   backRef = ptr_lib::make_shared<RegexBackrefManager>();
   cm = ptr_lib::make_shared<RegexComponentSetMatcher>("[^<a><b><c>]", backRef);
   res = cm->match(Name("/b/d"), 1, 1);
   BOOST_CHECK_EQUAL(res, true);
-  BOOST_CHECK_EQUAL(cm->getMatchResult ().size(), 1);    
+  BOOST_CHECK_EQUAL(cm->getMatchResult ().size(), 1);
   BOOST_CHECK_EQUAL(cm->getMatchResult ()[0].toEscapedString(), string("d"));
 
 }
@@ -229,7 +227,7 @@
   BOOST_CHECK_EQUAL(cm->getMatchResult ().size(), 0);
 
 
-    
+
   backRef = ptr_lib::make_shared<RegexBackrefManager>();
   cm = ptr_lib::make_shared<RegexRepeatMatcher>("[<a><b>]{,2}", backRef, 8);
   res = cm->match(Name("/a/b/a/b/e/"), 0, 3);
diff --git a/tests/util/test-scheduler.cpp b/tests/util/test-scheduler.cpp
index 66417da..01fb18c 100644
--- a/tests/util/test-scheduler.cpp
+++ b/tests/util/test-scheduler.cpp
@@ -6,7 +6,7 @@
 
 #include "util/scheduler.hpp"
 
-#include <boost/test/unit_test.hpp>
+#include "boost-test.hpp"
 
 namespace ndn {
 
diff --git a/tests/util/test-time.cpp b/tests/util/test-time.cpp
index 6351bb1..9a6bf1e 100644
--- a/tests/util/test-time.cpp
+++ b/tests/util/test-time.cpp
@@ -3,10 +3,10 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "util/time.hpp"
 
+#include "boost-test.hpp"
+
 namespace ndn {
 
 BOOST_AUTO_TEST_SUITE(TestTime)
diff --git a/tests/wscript b/tests/wscript
index 6caa5f3..f5ebcc8 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -11,6 +11,7 @@
         source=bld.path.ant_glob(['**/*.cpp'],
                                  excl=['**/*-osx.cpp', '**/*-sqlite3.cpp']),
         use='ndn-cpp-dev',
+        includes='.',
         install_path=None,
         )