diff --git a/src/encoding/block.cpp b/src/encoding/block.cpp
index 691bbdf..2113064 100644
--- a/src/encoding/block.cpp
+++ b/src/encoding/block.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).
  *
@@ -25,6 +25,7 @@
 #include "buffer-stream.hpp"
 #include "encoding-buffer.hpp"
 #include "tlv.hpp"
+#include "../util/string-helper.hpp"
 
 #include <boost/asio/buffer.hpp>
 #include <boost/range/adaptor/reversed.hpp>
@@ -379,12 +380,19 @@
     return m_size;
   }
 
+  size_t len = encodeValue(estimator);
+  len += estimator.prependVarNumber(len);
+  len += estimator.prependVarNumber(m_type);
+  return len;
+}
+
+size_t
+Block::encodeValue(EncodingEstimator& estimator) const
+{
   size_t len = 0;
   for (const Block& element : m_elements | boost::adaptors::reversed) {
     len += element.encode(estimator);
   }
-  len += estimator.prependVarNumber(len);
-  len += estimator.prependVarNumber(m_type);
   return len;
 }
 
@@ -509,4 +517,31 @@
           std::memcmp(lhs.value(), rhs.value(), lhs.value_size()) == 0);
 }
 
+std::ostream&
+operator<<(std::ostream& os, const Block& block)
+{
+  auto oldFmt = os.flags(std::ios_base::dec);
+
+  if (block.empty()) {
+    os << "[invalid]";
+  }
+  else if (!block.m_elements.empty()) {
+    EncodingEstimator estimator;
+    size_t tlvLength = block.encodeValue(estimator);
+    os << block.type() << '[' << tlvLength << "]={";
+    std::copy(block.elements_begin(), block.elements_end(), make_ostream_joiner(os, ','));
+    os << '}';
+  }
+  else if (block.value_size() > 0) {
+    os << block.type() << '[' << block.value_size() << "]=";
+    printHex(os, block.value(), block.value_size(), true);
+  }
+  else {
+    os << block.type() << "[empty]";
+  }
+
+  os.flags(oldFmt);
+  return os;
+}
+
 } // namespace ndn
diff --git a/src/encoding/block.hpp b/src/encoding/block.hpp
index 2e0601d..63f3677 100644
--- a/src/encoding/block.hpp
+++ b/src/encoding/block.hpp
@@ -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).
  *
@@ -384,6 +384,11 @@
   size_t
   encode(EncodingEstimator& estimator) const;
 
+  /** @brief Estimate TLV-LENGTH as if sub elements are encoded into TLV-VALUE
+   */
+  size_t
+  encodeValue(EncodingEstimator& estimator) const;
+
   /** @brief Encode sub elements into TLV-VALUE and prepend Block to encoder
    *  @post TLV-VALUE contains sub elements from elements()
    *  @post internal buffer and iterators point to Encoder's buffer
@@ -420,6 +425,18 @@
    *  This field is valid only if parse() has been executed.
    */
   mutable element_container m_elements;
+
+  /** @brief Print @p block to @p os.
+   *
+   *  Default-constructed block is printed as: `[invalid]`.
+   *  Zero-length block is printed as: `TT[empty]`, where TT is TLV-TYPE in decimal.
+   *  Non-zero-length block on which @c Block::parse is not called is printed as: `TT[LL]=VVVV`,
+   *  where LL is TLV-LENGTH in decimal, and VVVV is TLV-VALUE is hexadecimal.
+   *  Block on which @c Block::parse has been called in printed as: `TT[LL]={SUB,SUB}`,
+   *  where SUB is a sub-element printed using this format.
+   */
+  friend std::ostream&
+  operator<<(std::ostream& os, const Block& block);
 };
 
 /** @brief Compare whether two Blocks have same TLV-TYPE, TLV-LENGTH, and TLV-VALUE
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);
