diff --git a/tests/unit-tests/data.t.cpp b/tests/unit-tests/data.t.cpp
index ccf4e5b..b7d49c3 100644
--- a/tests/unit-tests/data.t.cpp
+++ b/tests/unit-tests/data.t.cpp
@@ -273,9 +273,9 @@
 
   // modify then re-encode as v0.2 format
   d.setName("/E");
-  BOOST_CHECK(d.wireEncode() ==
-              "0630 0703080145 1400 1500 16031B0100 "
-              "1720612A79399E60304A9F701C1ECAC7956BF2F1B046E6C6F0D6C29B3FE3A29BAD76"_block);
+  BOOST_CHECK_EQUAL(d.wireEncode(),
+    "0630 0703080145 1400 1500 16031B0100 "
+    "1720612A79399E60304A9F701C1ECAC7956BF2F1B046E6C6F0D6C29B3FE3A29BAD76"_block);
 }
 
 BOOST_AUTO_TEST_CASE(Full)
@@ -293,9 +293,9 @@
 
   // modify then re-encode as v0.2 format
   d.setName("/E");
-  BOOST_CHECK(d.wireEncode() ==
-              "0630 0703080145 1400 1500 16031B0100 "
-              "1720612A79399E60304A9F701C1ECAC7956BF2F1B046E6C6F0D6C29B3FE3A29BAD76"_block);
+  BOOST_CHECK_EQUAL(d.wireEncode(),
+    "0630 0703080145 1400 1500 16031B0100 "
+    "1720612A79399E60304A9F701C1ECAC7956BF2F1B046E6C6F0D6C29B3FE3A29BAD76"_block);
 }
 
 BOOST_AUTO_TEST_CASE(CriticalElementOutOfOrder)
diff --git a/tests/unit-tests/delegation-list.t.cpp b/tests/unit-tests/delegation-list.t.cpp
index 7ae92ed..e2aada8 100644
--- a/tests/unit-tests/delegation-list.t.cpp
+++ b/tests/unit-tests/delegation-list.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -178,7 +178,7 @@
 
   EncodingBuffer encoder;
   dl.wireEncode(encoder);
-  BOOST_CHECK(encoder.block() == makeDelegationListBlock(tlv::ForwardingHint, {DEL1B, DEL2A}));
+  BOOST_CHECK_EQUAL(encoder.block(), makeDelegationListBlock(tlv::ForwardingHint, {DEL1B, DEL2A}));
 }
 
 BOOST_AUTO_TEST_CASE(InsertReplace)
@@ -191,7 +191,7 @@
 
   EncodingBuffer encoder;
   dl.wireEncode(encoder);
-  BOOST_CHECK(encoder.block() == makeDelegationListBlock(tlv::ForwardingHint, {DEL1A}));
+  BOOST_CHECK_EQUAL(encoder.block(), makeDelegationListBlock(tlv::ForwardingHint, {DEL1A}));
 }
 
 BOOST_AUTO_TEST_CASE(InsertAppend)
@@ -204,7 +204,7 @@
 
   EncodingBuffer encoder;
   dl.wireEncode(encoder);
-  BOOST_CHECK(encoder.block() == makeDelegationListBlock(tlv::ForwardingHint, {DEL1A, DEL2A}));
+  BOOST_CHECK_EQUAL(encoder.block(), makeDelegationListBlock(tlv::ForwardingHint, {DEL1A, DEL2A}));
 }
 
 BOOST_AUTO_TEST_CASE(InsertSkip)
@@ -216,7 +216,7 @@
 
   EncodingBuffer encoder;
   dl.wireEncode(encoder);
-  BOOST_CHECK(encoder.block() == makeDelegationListBlock(tlv::ForwardingHint, {DEL2A}));
+  BOOST_CHECK_EQUAL(encoder.block(), makeDelegationListBlock(tlv::ForwardingHint, {DEL2A}));
 }
 
 BOOST_AUTO_TEST_CASE(Unsorted)
@@ -231,7 +231,7 @@
 
   EncodingBuffer encoder;
   dl.wireEncode(encoder, tlv::Content);
-  BOOST_CHECK(encoder.block() == makeDelegationListBlock(tlv::Content, {DEL2A, DEL1B}));
+  BOOST_CHECK_EQUAL(encoder.block(), makeDelegationListBlock(tlv::Content, {DEL2A, DEL1B}));
 }
 
 BOOST_AUTO_TEST_CASE(EncodeBadType)
diff --git a/tests/unit-tests/encoding/block-helpers.t.cpp b/tests/unit-tests/encoding/block-helpers.t.cpp
index 47226b3..9247e0a 100644
--- a/tests/unit-tests/encoding/block-helpers.t.cpp
+++ b/tests/unit-tests/encoding/block-helpers.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -95,8 +95,8 @@
   Block b3 = makeBinaryBlock(100, buf1.begin(), buf1.end()); // fast encoding (random access iterator)
   Block b4 = makeBinaryBlock(100, buf3.begin(), buf3.end()); // slow encoding (general iterator)
 
-  BOOST_CHECK(b1 == b2);
-  BOOST_CHECK(b1 == b3);
+  BOOST_CHECK_EQUAL(b1, b2);
+  BOOST_CHECK_EQUAL(b1, b3);
   BOOST_CHECK_EQUAL(b1.type(), 100);
   BOOST_CHECK_EQUAL(b1.value_size(), buf1.size());
   BOOST_CHECK_EQUAL_COLLECTIONS(b1.value_begin(), b1.value_end(),
@@ -112,7 +112,7 @@
   b1.parse();
   BOOST_CHECK_EQUAL(b1.elements().size(), 1);
   BOOST_CHECK_EQUAL(b1.elements().begin()->type(), name.wireEncode().type());
-  BOOST_CHECK(*b1.elements().begin() == name.wireEncode());
+  BOOST_CHECK_EQUAL(*b1.elements().begin(), name.wireEncode());
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestBlockHelpers
diff --git a/tests/unit-tests/encoding/block.t.cpp b/tests/unit-tests/encoding/block.t.cpp
index 967a285..70174aa 100644
--- a/tests/unit-tests/encoding/block.t.cpp
+++ b/tests/unit-tests/encoding/block.t.cpp
@@ -22,7 +22,9 @@
 #include "encoding/block.hpp"
 #include "encoding/block-helpers.hpp"
 
+#include "block-literal.hpp"
 #include "boost-test.hpp"
+#include <boost/lexical_cast.hpp>
 #include <cstring>
 #include <sstream>
 
@@ -492,6 +494,42 @@
   BOOST_CHECK_EQUAL(e != f, true);
 }
 
+BOOST_AUTO_TEST_CASE(Print)
+{
+  // default constructed
+  Block b;
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(b), "[invalid]");
+
+  // zero length
+  b = "0700"_block;
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(b), "7[empty]");
+
+  // unparsed
+  b = "0E10FF7E4E6B3B21C902660F16ED589FCCCC"_block;
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(b),
+                    "14[16]=FF7E4E6B3B21C902660F16ED589FCCCC");
+  // set and restore format flags
+  {
+    std::ostringstream oss;
+    oss << std::showbase << std::hex << 0xd23c4 << b << 0x4981e;
+    BOOST_CHECK_EQUAL(oss.str(), "0xd23c414[16]=FF7E4E6B3B21C902660F16ED589FCCCC0x4981e");
+  }
+
+  // parsed
+  b = "FD010808 0502CADD 59024E42"_block;
+  b.parse();
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(b),
+                    "264[8]={5[2]=CADD,89[2]=4E42}");
+
+  // parsed then modified: print modified sub-elements
+  b = "FD010808 0502CADD 59024E42"_block;
+  b.parse();
+  b.erase(b.elements_begin());
+  b.push_back("10022386"_block);
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(b),
+                    "264[8]={89[2]=4E42,16[2]=2386}");
+}
+
 BOOST_AUTO_TEST_SUITE_END() // TestBlock
 BOOST_AUTO_TEST_SUITE_END() // Encoding
 
diff --git a/tests/unit-tests/interest.t.cpp b/tests/unit-tests/interest.t.cpp
index 2860551..f1e79dc 100644
--- a/tests/unit-tests/interest.t.cpp
+++ b/tests/unit-tests/interest.t.cpp
@@ -147,7 +147,7 @@
 
   // modify then re-encode as v0.2 format
   i.setNonce(0x54657c95);
-  BOOST_CHECK(i.wireEncode() == "0510 0703080149 09030E0101 0A04957C6554"_block);
+  BOOST_CHECK_EQUAL(i.wireEncode(), "0510 0703080149 09030E0101 0A04957C6554"_block);
 }
 
 BOOST_AUTO_TEST_CASE(Full)
@@ -170,9 +170,8 @@
 
   // modify then re-encode as v0.2 format
   i.setName("/J");
-  BOOST_CHECK(i.wireEncode() ==
-              "0520 070308014A 09021200 0A044ACB1E4C 0C0276A1 "
-              "1E0B(1F09 1E023E15 0703080148)"_block);
+  BOOST_CHECK_EQUAL(i.wireEncode(),
+    "0520 070308014A 09021200 0A044ACB1E4C 0C0276A1 1E0B(1F09 1E023E15 0703080148)"_block);
 }
 
 BOOST_AUTO_TEST_CASE(CriticalElementOutOfOrder)
diff --git a/tests/unit-tests/key-locator.t.cpp b/tests/unit-tests/key-locator.t.cpp
index 05dc94a..ce3c6ae 100644
--- a/tests/unit-tests/key-locator.t.cpp
+++ b/tests/unit-tests/key-locator.t.cpp
@@ -52,7 +52,7 @@
                                 wire.begin(), wire.end());
 
   KeyLocator b(wire);
-  BOOST_CHECK(a == b);
+  BOOST_CHECK_EQUAL(a, b);
   BOOST_CHECK_EQUAL(b.getType(), KeyLocator::KeyLocator_None);
   BOOST_CHECK_THROW(b.getName(), KeyLocator::Error);
   BOOST_CHECK_THROW(b.getKeyDigest(), KeyLocator::Error);
@@ -83,7 +83,7 @@
                                 wire.begin(), wire.end());
 
   KeyLocator b(wire);
-  BOOST_CHECK(a == b);
+  BOOST_CHECK_EQUAL(a, b);
   BOOST_CHECK_EQUAL(b.getType(), KeyLocator::KeyLocator_Name);
   BOOST_CHECK_EQUAL(b.getName(), Name("/N"));
   BOOST_CHECK_THROW(b.getKeyDigest(), KeyLocator::Error);
@@ -100,7 +100,7 @@
   KeyLocator a;
   a.setKeyDigest(digestBuffer);
   BOOST_CHECK_EQUAL(a.getType(), KeyLocator::KeyLocator_KeyDigest);
-  BOOST_CHECK(a.getKeyDigest() == expectedDigestBlock);
+  BOOST_CHECK_EQUAL(a.getKeyDigest(), expectedDigestBlock);
   BOOST_CHECK_THROW(a.getName(), KeyLocator::Error);
 
   Block wire;
@@ -118,9 +118,9 @@
                                 wire.begin(), wire.end());
 
   KeyLocator b(wire);
-  BOOST_CHECK(a == b);
+  BOOST_CHECK_EQUAL(a, b);
   BOOST_CHECK_EQUAL(b.getType(), KeyLocator::KeyLocator_KeyDigest);
-  BOOST_CHECK(b.getKeyDigest() == expectedDigestBlock);
+  BOOST_CHECK_EQUAL(b.getKeyDigest(), expectedDigestBlock);
   BOOST_CHECK_THROW(b.getName(), KeyLocator::Error);
 
   BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(b), "KeyDigest=123456789A...");
diff --git a/tests/unit-tests/meta-info.t.cpp b/tests/unit-tests/meta-info.t.cpp
index 9e04b78..aee3b69 100644
--- a/tests/unit-tests/meta-info.t.cpp
+++ b/tests/unit-tests/meta-info.t.cpp
@@ -46,7 +46,7 @@
   b.setType(a.getType());
   b.setFreshnessPeriod(a.getFreshnessPeriod());
   b.setFinalBlock(a.getFinalBlock());
-  BOOST_CHECK(b.wireEncode() == "1400"_block);
+  BOOST_CHECK_EQUAL(b.wireEncode(), "1400"_block);
   BOOST_CHECK_EQUAL(a, b); // expected failure #4569
 
   // non-default values
@@ -61,7 +61,7 @@
   b.setType(a.getType());
   b.setFreshnessPeriod(a.getFreshnessPeriod());
   b.setFinalBlockId(a.getFinalBlockId());
-  BOOST_CHECK(b.wireEncode() == wire2);
+  BOOST_CHECK_EQUAL(b.wireEncode(), wire2);
   BOOST_CHECK_EQUAL(a, b);
 
   // FinalBlockId is typed name component
@@ -75,7 +75,7 @@
   b.setType(a.getType());
   b.setFreshnessPeriod(a.getFreshnessPeriod());
   b.setFinalBlockId(a.getFinalBlockId());
-  BOOST_CHECK(b.wireEncode() == wire3);
+  BOOST_CHECK_EQUAL(b.wireEncode(), wire3);
   BOOST_CHECK_EQUAL(a, b);
 }
 
@@ -97,19 +97,19 @@
     info1.addAppMetaInfo(makeStringBlock(type, ss[i]));
   }
 
-  BOOST_CHECK(info1.findAppMetaInfo(252) == 0);
+  BOOST_CHECK(info1.findAppMetaInfo(252) == nullptr);
 
   info1.addAppMetaInfo(makeNonNegativeIntegerBlock(252, 1000));
-  BOOST_CHECK(info1.findAppMetaInfo(252) != 0);
+  BOOST_CHECK(info1.findAppMetaInfo(252) != nullptr);
 
   info1.addAppMetaInfo(makeNonNegativeIntegerBlock(252, 1000));
-  BOOST_CHECK(info1.findAppMetaInfo(252) != 0);
+  BOOST_CHECK(info1.findAppMetaInfo(252) != nullptr);
 
   info1.removeAppMetaInfo(252);
-  BOOST_CHECK(info1.findAppMetaInfo(252) != 0);
+  BOOST_CHECK(info1.findAppMetaInfo(252) != nullptr);
 
   info1.removeAppMetaInfo(252);
-  BOOST_CHECK(info1.findAppMetaInfo(252) == 0);
+  BOOST_CHECK(info1.findAppMetaInfo(252) == nullptr);
 
   // // These octets are obtained by the snippet below.
   // // This check is intended to detect unexpected encoding change in the future.
diff --git a/tests/unit-tests/mgmt/dispatcher.t.cpp b/tests/unit-tests/mgmt/dispatcher.t.cpp
index 9f8d34d..69f389d 100644
--- a/tests/unit-tests/mgmt/dispatcher.t.cpp
+++ b/tests/unit-tests/mgmt/dispatcher.t.cpp
@@ -226,9 +226,9 @@
   BOOST_CHECK_EQUAL(nCallbackCalled, 0);
   BOOST_CHECK_EQUAL(face.sentData.size(), 2);
 
-  BOOST_CHECK(face.sentData[0].getContentType() == tlv::ContentType_Blob);
+  BOOST_CHECK_EQUAL(face.sentData[0].getContentType(), tlv::ContentType_Blob);
   BOOST_CHECK_EQUAL(ControlResponse(face.sentData[0].getContent().blockFromValue()).getCode(), 403);
-  BOOST_CHECK(face.sentData[1].getContentType() == tlv::ContentType_Blob);
+  BOOST_CHECK_EQUAL(face.sentData[1].getContentType(), tlv::ContentType_Blob);
   BOOST_CHECK_EQUAL(ControlResponse(face.sentData[1].getContent().blockFromValue()).getCode(), 403);
 
   face.receive(*makeInterest("/root/test/%80%00/valid"));
@@ -354,9 +354,9 @@
   advanceClocks(1_ms, 20);
   BOOST_CHECK_EQUAL(face.sentData.size(), 2);
 
-  BOOST_CHECK(face.sentData[0].getContentType() == tlv::ContentType_Blob);
+  BOOST_CHECK_EQUAL(face.sentData[0].getContentType(), tlv::ContentType_Blob);
   BOOST_CHECK_EQUAL(ControlResponse(face.sentData[0].getContent().blockFromValue()).getCode(), 403);
-  BOOST_CHECK(face.sentData[1].getContentType() == tlv::ContentType_Blob);
+  BOOST_CHECK_EQUAL(face.sentData[1].getContentType(), tlv::ContentType_Blob);
   BOOST_CHECK_EQUAL(ControlResponse(face.sentData[1].getContent().blockFromValue()).getCode(), 403);
 
   face.sentData.clear();
@@ -371,7 +371,7 @@
 
   auto fetchedData = storage.find(interestSmall);
   BOOST_REQUIRE(fetchedData != nullptr);
-  BOOST_CHECK(face.sentData[0].wireEncode() == fetchedData->wireEncode());
+  BOOST_CHECK_EQUAL(face.sentData[0].wireEncode(), fetchedData->wireEncode());
 
   face.receive(*makeInterest(Name("/root/test/small/valid").appendVersion(10))); // should be ignored
   face.receive(*makeInterest(Name("/root/test/small/valid").appendSegment(20))); // should be ignored
@@ -382,10 +382,10 @@
   Block content = face.sentData[0].getContent();
   BOOST_CHECK_NO_THROW(content.parse());
 
-  BOOST_CHECK_EQUAL(content.elements().size(), 3);
-  BOOST_CHECK(content.elements()[0] == smallBlock);
-  BOOST_CHECK(content.elements()[1] == smallBlock);
-  BOOST_CHECK(content.elements()[2] == smallBlock);
+  BOOST_REQUIRE_EQUAL(content.elements().size(), 3);
+  BOOST_CHECK_EQUAL(content.elements()[0], smallBlock);
+  BOOST_CHECK_EQUAL(content.elements()[1], smallBlock);
+  BOOST_CHECK_EQUAL(content.elements()[2], smallBlock);
 
   storage.erase("/", true); // clear the storage
   face.sentData.clear();
@@ -407,7 +407,7 @@
 
   // the Data sent through the face should be the same as the first Data in the storage
   BOOST_CHECK_EQUAL(face.sentData[0].getName(), dataInStorage[0].getName());
-  BOOST_CHECK(face.sentData[0].getContent() == dataInStorage[0].getContent());
+  BOOST_CHECK_EQUAL(face.sentData[0].getContent(), dataInStorage[0].getContent());
 
   content = [&dataInStorage] () -> Block {
     EncodingBuffer encoder;
@@ -421,17 +421,17 @@
   }();
 
   BOOST_CHECK_NO_THROW(content.parse());
-  BOOST_CHECK_EQUAL(content.elements().size(), 3);
-  BOOST_CHECK(content.elements()[0] == largeBlock);
-  BOOST_CHECK(content.elements()[1] == largeBlock);
-  BOOST_CHECK(content.elements()[2] == largeBlock);
+  BOOST_REQUIRE_EQUAL(content.elements().size(), 3);
+  BOOST_CHECK_EQUAL(content.elements()[0], largeBlock);
+  BOOST_CHECK_EQUAL(content.elements()[1], largeBlock);
+  BOOST_CHECK_EQUAL(content.elements()[2], largeBlock);
 
   storage.erase("/", true);// clear the storage
   face.sentData.clear();
   face.receive(*makeInterest("/root/test/reject/%80%00/valid")); // returns nack
   advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(face.sentData.size(), 1);
-  BOOST_CHECK(face.sentData[0].getContentType() == tlv::ContentType_Nack);
+  BOOST_CHECK_EQUAL(face.sentData[0].getContentType(), tlv::ContentType_Nack);
   BOOST_CHECK_EQUAL(ControlResponse(face.sentData[0].getContent().blockFromValue()).getCode(), 400);
   BOOST_CHECK_EQUAL(storage.size(), 0); // the nack packet will not be inserted into the in-memory storage
 }
@@ -460,30 +460,30 @@
   post(block);
   advanceClocks(1_ms, 10);
 
-  BOOST_CHECK_EQUAL(face.sentData.size(), 4);
+  BOOST_REQUIRE_EQUAL(face.sentData.size(), 4);
   BOOST_CHECK_EQUAL(face.sentData[0].getName(), "/root/test/%FE%00");
   BOOST_CHECK_EQUAL(face.sentData[1].getName(), "/root/test/%FE%01");
   BOOST_CHECK_EQUAL(face.sentData[2].getName(), "/root/test/%FE%02");
   BOOST_CHECK_EQUAL(face.sentData[3].getName(), "/root/test/%FE%03");
 
-  BOOST_CHECK(face.sentData[0].getContent().blockFromValue() == block);
-  BOOST_CHECK(face.sentData[1].getContent().blockFromValue() == block);
-  BOOST_CHECK(face.sentData[2].getContent().blockFromValue() == block);
-  BOOST_CHECK(face.sentData[3].getContent().blockFromValue() == block);
+  BOOST_CHECK_EQUAL(face.sentData[0].getContent().blockFromValue(), block);
+  BOOST_CHECK_EQUAL(face.sentData[1].getContent().blockFromValue(), block);
+  BOOST_CHECK_EQUAL(face.sentData[2].getContent().blockFromValue(), block);
+  BOOST_CHECK_EQUAL(face.sentData[3].getContent().blockFromValue(), block);
 
   // each version of notification will be sent to both places
   std::vector<Data> dataInStorage;
   std::copy(storage.begin(), storage.end(), std::back_inserter(dataInStorage));
-  BOOST_CHECK_EQUAL(dataInStorage.size(), 4);
+  BOOST_REQUIRE_EQUAL(dataInStorage.size(), 4);
   BOOST_CHECK_EQUAL(dataInStorage[0].getName(), "/root/test/%FE%00");
   BOOST_CHECK_EQUAL(dataInStorage[1].getName(), "/root/test/%FE%01");
   BOOST_CHECK_EQUAL(dataInStorage[2].getName(), "/root/test/%FE%02");
   BOOST_CHECK_EQUAL(dataInStorage[3].getName(), "/root/test/%FE%03");
 
-  BOOST_CHECK(dataInStorage[0].getContent().blockFromValue() == block);
-  BOOST_CHECK(dataInStorage[1].getContent().blockFromValue() == block);
-  BOOST_CHECK(dataInStorage[2].getContent().blockFromValue() == block);
-  BOOST_CHECK(dataInStorage[3].getContent().blockFromValue() == block);
+  BOOST_CHECK_EQUAL(dataInStorage[0].getContent().blockFromValue(), block);
+  BOOST_CHECK_EQUAL(dataInStorage[1].getContent().blockFromValue(), block);
+  BOOST_CHECK_EQUAL(dataInStorage[2].getContent().blockFromValue(), block);
+  BOOST_CHECK_EQUAL(dataInStorage[3].getContent().blockFromValue(), block);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestDispatcher
diff --git a/tests/unit-tests/mgmt/status-dataset-context.t.cpp b/tests/unit-tests/mgmt/status-dataset-context.t.cpp
index c5af199..34e6fc1 100644
--- a/tests/unit-tests/mgmt/status-dataset-context.t.cpp
+++ b/tests/unit-tests/mgmt/status-dataset-context.t.cpp
@@ -97,7 +97,7 @@
 {
   Name dataName = context.getPrefix();
   BOOST_CHECK(dataName[-1].isVersion());
-  BOOST_CHECK(dataName.getPrefix(-1) == interest->getName());
+  BOOST_CHECK_EQUAL(dataName.getPrefix(-1), interest->getName());
 }
 
 BOOST_AUTO_TEST_CASE(SetValid)
@@ -105,7 +105,7 @@
   Name validPrefix = Name(interest->getName()).append("/valid");
   BOOST_CHECK_NO_THROW(context.setPrefix(validPrefix));
   BOOST_CHECK(context.getPrefix()[-1].isVersion());
-  BOOST_CHECK(context.getPrefix().getPrefix(-1) == validPrefix);
+  BOOST_CHECK_EQUAL(context.getPrefix().getPrefix(-1), validPrefix);
 }
 
 BOOST_AUTO_TEST_CASE(SetInvalid)
@@ -161,7 +161,7 @@
   const auto& args = sendDataHistory[0];
 
   BOOST_CHECK_EQUAL(args.dataName, makeSegmentName(0));
-  BOOST_CHECK(args.content.blockFromValue() == contentBlock);
+  BOOST_CHECK_EQUAL(args.content.blockFromValue(), contentBlock);
   BOOST_CHECK_EQUAL(args.imsFresh, defaultImsFresh);
   BOOST_CHECK_EQUAL(args.isFinalBlock, true);
 }
@@ -199,7 +199,7 @@
   auto contentLargeBlock = concatenateDataContent();
   BOOST_CHECK_NO_THROW(contentLargeBlock.parse());
   BOOST_REQUIRE_EQUAL(contentLargeBlock.elements().size(), 1);
-  BOOST_CHECK(contentLargeBlock.elements()[0] == largeBlock);
+  BOOST_CHECK_EQUAL(contentLargeBlock.elements()[0], largeBlock);
 }
 
 BOOST_AUTO_TEST_CASE(MultipleSmall)
@@ -220,7 +220,7 @@
   BOOST_CHECK_NO_THROW(contentMultiBlocks.parse());
   BOOST_CHECK_EQUAL(contentMultiBlocks.elements().size(), nBlocks);
   for (auto&& element : contentMultiBlocks.elements()) {
-    BOOST_CHECK(element == contentBlock);
+    BOOST_CHECK_EQUAL(element, contentBlock);
   }
 }
 
diff --git a/tests/unit-tests/name.t.cpp b/tests/unit-tests/name.t.cpp
index c934be1..af71206 100644
--- a/tests/unit-tests/name.t.cpp
+++ b/tests/unit-tests/name.t.cpp
@@ -48,8 +48,9 @@
   BOOST_CHECK(name[5].isImplicitSha256Digest());
 
   Block wire = name.wireEncode();
-  BOOST_CHECK(wire == "0737 0804456D6964 FD61D2025033 0800 08012E 08021C9F "
-              "01200415E3624A151850AC686C84F155F29808C0DD73819AA4A4C20BE73A4D8A874C"_block);
+  BOOST_CHECK_EQUAL(wire,
+    "0737 0804456D6964 FD61D2025033 0800 08012E 08021C9F "
+    "01200415E3624A151850AC686C84F155F29808C0DD73819AA4A4C20BE73A4D8A874C"_block);
 
   Name decoded(wire);
   BOOST_CHECK_EQUAL(decoded, name);
@@ -199,37 +200,37 @@
 BOOST_AUTO_TEST_CASE(AppendComponent)
 {
   Name name;
-  BOOST_CHECK(name.wireEncode() == "0700"_block);
+  BOOST_CHECK_EQUAL(name.wireEncode(), "0700"_block);
 
   name.append(Component("Emid"));
-  BOOST_CHECK(name.wireEncode() == "0706 0804456D6964"_block);
+  BOOST_CHECK_EQUAL(name.wireEncode(), "0706 0804456D6964"_block);
 
   name.append(25042, reinterpret_cast<const uint8_t*>("P3"), 2);
-  BOOST_CHECK(name.wireEncode() == "070C 0804456D6964 FD61D2025033"_block);
+  BOOST_CHECK_EQUAL(name.wireEncode(), "070C 0804456D6964 FD61D2025033"_block);
 
   name.append(reinterpret_cast<const uint8_t*>("."), 1);
-  BOOST_CHECK(name.wireEncode() == "070F 0804456D6964 FD61D2025033 08012E"_block);
+  BOOST_CHECK_EQUAL(name.wireEncode(), "070F 0804456D6964 FD61D2025033 08012E"_block);
 
   std::vector<uint8_t> v1{0x28, 0xF0, 0xA3, 0x6B};
   name.append(16, v1.begin(), v1.end());
-  BOOST_CHECK(name.wireEncode() == "0715 0804456D6964 FD61D2025033 08012E 100428F0A36B"_block);
+  BOOST_CHECK_EQUAL(name.wireEncode(), "0715 0804456D6964 FD61D2025033 08012E 100428F0A36B"_block);
 
   BOOST_CHECK(!name.empty());
   name.clear();
   BOOST_CHECK(name.empty());
-  BOOST_CHECK(name.wireEncode() == "0700"_block);
+  BOOST_CHECK_EQUAL(name.wireEncode(), "0700"_block);
 
   name.append(v1.begin(), v1.end());
-  BOOST_CHECK(name.wireEncode() == "0706 080428F0A36B"_block);
+  BOOST_CHECK_EQUAL(name.wireEncode(), "0706 080428F0A36B"_block);
 
   name.append("xKh");
-  BOOST_CHECK(name.wireEncode() == "070B 080428F0A36B 0803784B68"_block);
+  BOOST_CHECK_EQUAL(name.wireEncode(), "070B 080428F0A36B 0803784B68"_block);
 
   name.append("0100"_block);
-  BOOST_CHECK(name.wireEncode() == "070F 080428F0A36B 0803784B68 08020100"_block);
+  BOOST_CHECK_EQUAL(name.wireEncode(), "070F 080428F0A36B 0803784B68 08020100"_block);
 
   name.append("080109"_block);
-  BOOST_CHECK(name.wireEncode() == "0712 080428F0A36B 0803784B68 08020100 080109"_block);
+  BOOST_CHECK_EQUAL(name.wireEncode(), "0712 080428F0A36B 0803784B68 08020100 080109"_block);
 }
 
 BOOST_AUTO_TEST_CASE(AppendPartialName)
@@ -237,7 +238,7 @@
   Name name("/A/B");
   name.append(PartialName("/6=C/D"))
       .append(PartialName("/E"));
-  BOOST_CHECK(name.wireEncode() == "070F 080141 080142 060143 080144 080145"_block);
+  BOOST_CHECK_EQUAL(name.wireEncode(), "070F 080141 080142 060143 080144 080145"_block);
 }
 
 BOOST_AUTO_TEST_CASE(AppendNumber)
diff --git a/tests/unit-tests/security/pib/pib-impl.t.cpp b/tests/unit-tests/security/pib/pib-impl.t.cpp
index 265c111..6094b0e 100644
--- a/tests/unit-tests/security/pib/pib-impl.t.cpp
+++ b/tests/unit-tests/security/pib/pib-impl.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -224,7 +224,8 @@
   BOOST_CHECK_EQUAL(this->pib.hasCertificate(this->id1Key1Cert1.getName()), true);
   BOOST_CHECK_EQUAL(this->pib.hasIdentity(this->id1), true);
   BOOST_CHECK_EQUAL(this->pib.hasKey(this->id1Key1Name), true);
-  BOOST_CHECK(this->pib.getCertificate(this->id1Key1Cert1.getName()).wireEncode() == this->id1Key1Cert1.wireEncode());
+  BOOST_CHECK_EQUAL(this->pib.getCertificate(this->id1Key1Cert1.getName()).wireEncode(),
+                    this->id1Key1Cert1.wireEncode());
   BOOST_CHECK_NO_THROW(this->pib.getDefaultCertificateOfKey(this->id1Key1Name));
   BOOST_CHECK_EQUAL(this->pib.getDefaultCertificateOfKey(this->id1Key1Name), this->id1Key1Cert1);
 
@@ -323,7 +324,7 @@
   BOOST_CHECK_EQUAL(this->pib.hasCertificate(this->id1Key1Cert1.getName()), true);
 
   auto cert = this->pib.getCertificate(this->id1Key1Cert1.getName());
-  BOOST_CHECK(cert.wireEncode() == this->id1Key1Cert1.wireEncode());
+  BOOST_CHECK_EQUAL(cert.wireEncode(), this->id1Key1Cert1.wireEncode());
 
   // Create a fake cert with the same name
   auto cert2 = this->id1Key2Cert1;
@@ -332,7 +333,7 @@
   this->pib.addCertificate(cert2);
 
   auto cert3 = this->pib.getCertificate(this->id1Key1Cert1.getName());
-  BOOST_CHECK(cert3.wireEncode() == cert2.wireEncode());
+  BOOST_CHECK_EQUAL(cert3.wireEncode(), cert2.wireEncode());
 
   // both key and certificate are overwritten
   Buffer keyBits3 = this->pib.getKeyBits(this->id1Key1Name);
diff --git a/tests/unit-tests/security/safe-bag.t.cpp b/tests/unit-tests/security/safe-bag.t.cpp
index 3c93e58..0423c69 100644
--- a/tests/unit-tests/security/safe-bag.t.cpp
+++ b/tests/unit-tests/security/safe-bag.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -150,7 +150,7 @@
   Block block(SAFE_BAG, sizeof(SAFE_BAG));
 
   // check safe bag block
-  BOOST_CHECK(wireBlock == block);
+  BOOST_CHECK_EQUAL(wireBlock, block);
 
   // wire decode
   SafeBag safeBag2;
diff --git a/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp b/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp
index 658b1c2..a819279 100644
--- a/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp
+++ b/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp
@@ -102,7 +102,7 @@
   sig.setKeyLocator(Name("/test/another/key/locator"));
 
   const Block& encodeSigInfoBlock2 = sig.getInfo();
-  BOOST_CHECK(sigInfoBlock != encodeSigInfoBlock2);
+  BOOST_CHECK_NE(sigInfoBlock, encodeSigInfoBlock2);
 }
 
 BOOST_AUTO_TEST_CASE(DataSignature)
diff --git a/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp b/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp
index 4599178..86dbb37 100644
--- a/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp
+++ b/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp
@@ -107,7 +107,7 @@
   sig.setKeyLocator(Name("/test/another/key/locator"));
 
   const Block& encodeSigInfoBlock2 = sig.getInfo();
-  BOOST_CHECK(sigInfoBlock != encodeSigInfoBlock2);
+  BOOST_CHECK_NE(sigInfoBlock, encodeSigInfoBlock2);
 }
 
 BOOST_AUTO_TEST_CASE(DataSignature)
diff --git a/tests/unit-tests/security/signing-info.t.cpp b/tests/unit-tests/security/signing-info.t.cpp
index 9a64a53..fc6f627 100644
--- a/tests/unit-tests/security/signing-info.t.cpp
+++ b/tests/unit-tests/security/signing-info.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -93,16 +93,16 @@
 BOOST_AUTO_TEST_CASE(CustomSignatureInfo)
 {
   SigningInfo info1;
-  BOOST_CHECK(info1.getSignatureInfo() == SignatureInfo());
+  BOOST_CHECK_EQUAL(info1.getSignatureInfo(), SignatureInfo());
 
   SignatureInfo si;
   si.setKeyLocator(Name("ndn:/test/key/locator"));
   info1.setSignatureInfo(si);
 
-  BOOST_CHECK(info1.getSignatureInfo() == si);
+  BOOST_CHECK_EQUAL(info1.getSignatureInfo(), si);
 
   SigningInfo info2(SigningInfo::SIGNER_TYPE_NULL, SigningInfo::getEmptyName(), si);
-  BOOST_CHECK(info2.getSignatureInfo() == si);
+  BOOST_CHECK_EQUAL(info2.getSignatureInfo(), si);
 }
 
 BOOST_AUTO_TEST_CASE(FromString)
diff --git a/tests/unit-tests/security/v2/additional-description.t.cpp b/tests/unit-tests/security/v2/additional-description.t.cpp
index 98431b6..7ceee8c 100644
--- a/tests/unit-tests/security/v2/additional-description.t.cpp
+++ b/tests/unit-tests/security/v2/additional-description.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -82,13 +82,13 @@
   BOOST_REQUIRE_NO_THROW(AdditionalDescription(Block(description, sizeof(description))));
   AdditionalDescription aDescription2(Block(description, sizeof(description)));
 
-  BOOST_CHECK(aDescription2 == aDescription);
+  BOOST_CHECK_EQUAL(aDescription2, aDescription);
 
   AdditionalDescription aDescription3;
   aDescription3.set("key3", "val3");
   aDescription3.set("key2", "val2");
 
-  BOOST_CHECK(aDescription2 != aDescription3);
+  BOOST_CHECK_NE(aDescription2, aDescription3);
 
   std::ostringstream os;
   os << aDescription;
diff --git a/tests/unit-tests/security/v2/key-chain.t.cpp b/tests/unit-tests/security/v2/key-chain.t.cpp
index d03f572..a4cc2f7 100644
--- a/tests/unit-tests/security/v2/key-chain.t.cpp
+++ b/tests/unit-tests/security/v2/key-chain.t.cpp
@@ -216,9 +216,9 @@
 
   // Create the third key
   Key key3 = m_keyChain.createKey(id);
-  BOOST_CHECK(key3.getName() != key2.getName());
+  BOOST_CHECK_NE(key3.getName(), key2.getName());
   // The added key will not be the default key, because the default key already exists
-  BOOST_CHECK(id.getDefaultKey().getName() == key2.getName());
+  BOOST_CHECK_EQUAL(id.getDefaultKey().getName(), key2.getName());
   BOOST_CHECK_EQUAL(id.getKeys().size(), 2);
   BOOST_REQUIRE_NO_THROW(key3.getDefaultCertificate());
 
diff --git a/tests/unit-tests/signature-info.t.cpp b/tests/unit-tests/signature-info.t.cpp
index 836c114..f5cf102 100644
--- a/tests/unit-tests/signature-info.t.cpp
+++ b/tests/unit-tests/signature-info.t.cpp
@@ -195,7 +195,7 @@
   info.setKeyLocator(KeyLocator("/test/key/locator"));
   info.setValidityPeriod(vp1);
 
-  BOOST_CHECK(info.getValidityPeriod() == vp1);
+  BOOST_CHECK_EQUAL(info.getValidityPeriod(), vp1);
 
   const Block& encoded = info.wireEncode();
 
@@ -206,7 +206,7 @@
   Block block(sigInfo, sizeof(sigInfo));
   SignatureInfo info2;
   info2.wireDecode(block);
-  BOOST_CHECK(info2.getValidityPeriod() == vp1);
+  BOOST_CHECK_EQUAL(info2.getValidityPeriod(), vp1);
 
   const security::ValidityPeriod& validityPeriod = info2.getValidityPeriod();
   BOOST_CHECK(validityPeriod.getPeriod() == std::make_pair(notBefore, notAfter));
diff --git a/tests/unit-tests/util/sqlite3-statement.t.cpp b/tests/unit-tests/util/sqlite3-statement.t.cpp
index 78e8664..13171c5 100644
--- a/tests/unit-tests/util/sqlite3-statement.t.cpp
+++ b/tests/unit-tests/util/sqlite3-statement.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -135,10 +135,9 @@
     BOOST_CHECK_EQUAL(stmt.step(), SQLITE_ROW);
     BOOST_CHECK_EQUAL(stmt.getInt(0), 4);
 
-    Block newBlock;
-    BOOST_CHECK_NO_THROW(newBlock = stmt.getBlock(1));
+    Block newBlock = stmt.getBlock(1);
     BOOST_CHECK_EQUAL(newBlock.type(), 100);
-    BOOST_CHECK(newBlock == block);
+    BOOST_CHECK_EQUAL(newBlock, block);
 
     BOOST_CHECK_EQUAL(stmt.step(), SQLITE_ROW);
     BOOST_CHECK_EQUAL(stmt.getInt(0), 5);
