diff --git a/ndn-cxx/impl/name-component-types.hpp b/ndn-cxx/impl/name-component-types.hpp
index 2a8563c..760495f 100644
--- a/ndn-cxx/impl/name-component-types.hpp
+++ b/ndn-cxx/impl/name-component-types.hpp
@@ -33,7 +33,7 @@
 namespace name {
 namespace detail {
 
-/** \brief Declare rules regarding a NameComponent type.
+/** \brief Declare rules for a NameComponent type.
  */
 class ComponentType : noncopyable
 {
@@ -151,7 +151,7 @@
   }
 };
 
-/** \brief Rules regarding GenericNameComponent.
+/** \brief Rules for GenericNameComponent.
  *
  *  GenericNameComponent has an alternate URI representation that omits the `<type-number>` prefix.
  *  This must be special-cased in the caller, and is not handled by this class.
@@ -166,7 +166,8 @@
   }
 };
 
-/** \brief Rules regarding a component type holding a SHA256 digest value.
+/** \brief Rules for a component type holding a SHA256 digest value, written as
+ *         a hex string in URI representation.
  */
 class Sha256ComponentType final : public ComponentType
 {
@@ -187,7 +188,8 @@
   void
   check(const Component& comp) const final
   {
-    if (!match(comp)) {
+    BOOST_ASSERT(comp.type() == m_type);
+    if (comp.value_size() != util::Sha256::DIGEST_SIZE) {
       NDN_THROW(Error(m_typeName + " TLV-LENGTH must be " + to_string(util::Sha256::DIGEST_SIZE)));
     }
   }
@@ -250,27 +252,87 @@
   }
 
 private:
-  uint32_t m_type;
-  std::string m_typeName;
-  std::string m_uriPrefix;
+  const uint32_t m_type;
+  const std::string m_typeName;
+  const std::string m_uriPrefix;
 };
 
 inline const Sha256ComponentType&
 getComponentType1()
 {
-  static Sha256ComponentType ct1(tlv::ImplicitSha256DigestComponent,
-                                 "ImplicitSha256DigestComponent", "sha256digest");
+  static const Sha256ComponentType ct1(tlv::ImplicitSha256DigestComponent,
+                                       "ImplicitSha256DigestComponent", "sha256digest");
   return ct1;
 }
 
 inline const Sha256ComponentType&
 getComponentType2()
 {
-  static Sha256ComponentType ct2(tlv::ParametersSha256DigestComponent,
-                                 "ParametersSha256DigestComponent", "params-sha256");
+  static const Sha256ComponentType ct2(tlv::ParametersSha256DigestComponent,
+                                       "ParametersSha256DigestComponent", "params-sha256");
   return ct2;
 }
 
+/** \brief Rules for a component type holding a nonNegativeInteger value, written as
+ *         a decimal number in URI representation.
+ */
+class DecimalComponentType final : public ComponentType
+{
+public:
+  DecimalComponentType(uint32_t type, const std::string& typeName, const std::string& uriPrefix)
+    : m_type(type)
+    , m_typeName(typeName)
+    , m_uriPrefix(uriPrefix)
+  {
+  }
+
+  // NOTE:
+  // We do not override check() and ensure that the component value is a well-formed
+  // nonNegativeInteger, because the application may be using the same typed component
+  // with different syntax and semantics.
+
+  const char*
+  getAltUriPrefix() const final
+  {
+    return m_uriPrefix.data();
+  }
+
+  Component
+  parseAltUriValue(const std::string& input) const final
+  {
+    uint64_t n = 0;
+    try {
+      n = std::stoull(input);
+    }
+    catch (const std::invalid_argument&) {
+      NDN_THROW(Error("Cannot convert to " + m_typeName + " (invalid format)"));
+    }
+    catch (const std::out_of_range&) {
+      NDN_THROW(Error("Cannot convert to " + m_typeName + " (out of range)"));
+    }
+    if (to_string(n) != input) {
+      NDN_THROW(Error("Cannot convert to " + m_typeName + " (invalid format)"));
+    }
+    return Component::fromNumber(n, m_type);
+  }
+
+  void
+  writeUri(std::ostream& os, const Component& comp) const final
+  {
+    if (comp.isNumber()) {
+      os << m_uriPrefix << '=' << comp.toNumber();
+    }
+    else {
+      ComponentType::writeUri(os, comp);
+    }
+  }
+
+private:
+  const uint32_t m_type;
+  const std::string m_typeName;
+  const std::string m_uriPrefix;
+};
+
 /** \brief Rules regarding NameComponent types.
  */
 class ComponentTypeTable : noncopyable
@@ -312,8 +374,8 @@
   }
 
 private:
-  ComponentType m_baseType;
-  std::array<const ComponentType*, 32> m_table;
+  const ComponentType m_baseType;
+  std::array<const ComponentType*, 38> m_table;
   std::unordered_map<std::string, const ComponentType*> m_uriPrefixes;
 };
 
@@ -322,11 +384,22 @@
 {
   m_table.fill(nullptr);
 
-  static GenericNameComponentType ct8;
-  set(tlv::GenericNameComponent, ct8);
-
   set(tlv::ImplicitSha256DigestComponent, getComponentType1());
   set(tlv::ParametersSha256DigestComponent, getComponentType2());
+
+  static const GenericNameComponentType ct8;
+  set(tlv::GenericNameComponent, ct8);
+
+  static const DecimalComponentType ct33(tlv::SegmentNameComponent, "SegmentNameComponent", "seg");
+  set(tlv::SegmentNameComponent, ct33);
+  static const DecimalComponentType ct34(tlv::ByteOffsetNameComponent, "ByteOffsetNameComponent", "off");
+  set(tlv::ByteOffsetNameComponent, ct34);
+  static const DecimalComponentType ct35(tlv::VersionNameComponent, "VersionNameComponent", "v");
+  set(tlv::VersionNameComponent, ct35);
+  static const DecimalComponentType ct36(tlv::TimestampNameComponent, "TimestampNameComponent", "t");
+  set(tlv::TimestampNameComponent, ct36);
+  static const DecimalComponentType ct37(tlv::SequenceNumNameComponent, "SequenceNumNameComponent", "seq");
+  set(tlv::SequenceNumNameComponent, ct37);
 }
 
 /** \brief Get the global ComponentTypeTable.
diff --git a/ndn-cxx/name-component.cpp b/ndn-cxx/name-component.cpp
index b7b9333..f41fda0 100644
--- a/ndn-cxx/name-component.cpp
+++ b/ndn-cxx/name-component.cpp
@@ -163,7 +163,7 @@
 
   auto ct = detail::getComponentTypeTable().findByUriPrefix(typePrefix);
   if (ct == nullptr) {
-    NDN_THROW(Error("Incorrect TLV-TYPE '" + typePrefix + "' in NameComponent URI"));
+    NDN_THROW(Error("Unknown TLV-TYPE '" + typePrefix + "' in NameComponent URI"));
   }
   return ct->parseAltUriValue(input.substr(equalPos + 1));
 }
@@ -187,16 +187,15 @@
 bool
 Component::isNumber() const
 {
-  return (value_size() == 1 || value_size() == 2 ||
-          value_size() == 4 || value_size() == 8);
+  return value_size() == 1 || value_size() == 2 ||
+         value_size() == 4 || value_size() == 8;
 }
 
 bool
 Component::isNumberWithMarker(uint8_t marker) const
 {
-  return (!empty() && value()[0] == marker &&
-          (value_size() == 2 || value_size() == 3 ||
-           value_size() == 5 || value_size() == 9));
+  return (value_size() == 2 || value_size() == 3 ||
+          value_size() == 5 || value_size() == 9) && value()[0] == marker;
 }
 
 bool
diff --git a/ndn-cxx/name-component.hpp b/ndn-cxx/name-component.hpp
index fbea9ac..2039e21 100644
--- a/ndn-cxx/name-component.hpp
+++ b/ndn-cxx/name-component.hpp
@@ -31,6 +31,7 @@
 namespace name {
 
 /** @brief Identify a style of NDN Naming Conventions.
+ *  @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
  */
 enum class Convention {
   MARKER = 1 << 0, ///< component markers (revision 1)
@@ -249,21 +250,17 @@
   fromEscapedString(const std::string& input);
 
   /**
-   * @brief Write *this to the output stream, escaping characters according to the NDN URI Scheme
-   *
-   * This also adds "..." to a value with zero or more "."
-   *
+   * @brief Write *this to the output stream, escaping characters according to the NDN URI format.
    * @param os The output stream where to write the URI escaped version of *this
+   * @sa http://named-data.net/doc/NDN-packet-spec/current/name.html#ndn-uri-scheme
    */
   void
   toUri(std::ostream& os) const;
 
   /**
-   * @brief Convert *this by escaping characters according to the NDN URI Scheme
-   *
-   * This also adds "..." to a value with zero or more "."
-   *
+   * @brief Convert *this by escaping characters according to the NDN URI format.
    * @return The escaped string
+   * @sa http://named-data.net/doc/NDN-packet-spec/current/name.html#ndn-uri-scheme
    */
   std::string
   toUri() const;
@@ -278,28 +275,29 @@
 
   /**
    * @brief Check if the component is a NameComponentWithMarker per NDN naming conventions rev1
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa NDN Naming Conventions revision 1:
+   *     https://named-data.net/wp-content/uploads/2014/08/ndn-tr-22-ndn-memo-naming-conventions.pdf
    */
   bool
   isNumberWithMarker(uint8_t marker) const;
 
   /**
    * @brief Check if the component is a version per NDN naming conventions
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    */
   bool
   isVersion() const;
 
   /**
    * @brief Check if the component is a segment number per NDN naming conventions
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    */
   bool
   isSegment() const;
 
   /**
    * @brief Check if the component is a byte offset per NDN naming conventions
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    */
   bool
   isByteOffset() const;
@@ -313,14 +311,14 @@
 
   /**
    * @brief Check if the component is a timestamp per NDN naming conventions
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    */
   bool
   isTimestamp() const;
 
   /**
    * @brief Check if the component is a sequence number per NDN naming conventions
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    */
   bool
   isSequenceNumber() const;
@@ -338,7 +336,8 @@
   /**
    * @brief Interpret this name component as NameComponentWithMarker
    *
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa NDN Naming Conventions revision 1:
+   *     https://named-data.net/wp-content/uploads/2014/08/ndn-tr-22-ndn-memo-naming-conventions.pdf
    *
    * @param marker 1-byte octet of the marker
    * @return The integer number.
@@ -351,7 +350,7 @@
   /**
    * @brief Interpret as version component using NDN naming conventions
    *
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    *
    * @throw tlv::Error not a Version component interpreted by the chosen convention(s).
    */
@@ -361,7 +360,7 @@
   /**
    * @brief Interpret as segment number component using NDN naming conventions
    *
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    *
    * @throw tlv::Error not a Segment component interpreted by the chosen convention(s).
    */
@@ -371,7 +370,7 @@
   /**
    * @brief Interpret as byte offset component using NDN naming conventions
    *
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    *
    * @throw tlv::Error not a ByteOffset component interpreted by the chosen convention(s).
    */
@@ -388,7 +387,7 @@
   /**
    * @brief Interpret as timestamp component using NDN naming conventions
    *
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    *
    * @throw tlv::Error not a Timestamp component interpreted by the chosen convention(s).
    */
@@ -398,7 +397,7 @@
   /**
    * @brief Interpret as sequence number component using NDN naming conventions
    *
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    *
    * @throw tlv::Error not a SequenceNumber component interpreted by the chosen convention(s).
    */
@@ -421,17 +420,14 @@
    *
    * NameComponentWithMarker is defined as:
    *
-   *     NameComponentWithMarker ::= NAME-COMPONENT-TYPE TLV-LEGTH
+   *     NameComponentWithMarker ::= NAME-COMPONENT-TYPE TLV-LENGTH
    *                                   Marker
    *                                   includedNonNegativeInteger
    *     Marker ::= BYTE
    *     includedNonNegativeInteger ::= BYTE{1,2,4,8}
-   *     NDN-TLV := TLV-TYPE TLV-LENGTH TLV-VALUE?
-   *     TLV-TYPE := VAR-NUMBER
-   *     TLV-LENGTH := VAR-NUMBER
-   *     TLV-VALUE := BYTE+
    *
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa NDN Naming Conventions revision 1:
+   *     https://named-data.net/wp-content/uploads/2014/08/ndn-tr-22-ndn-memo-naming-conventions.pdf
    *
    * @param marker 1-byte marker octet
    * @param number The non-negative number
@@ -442,7 +438,7 @@
   /**
    * @brief Create version component using NDN naming conventions
    *
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    */
   static Component
   fromVersion(uint64_t version);
@@ -450,7 +446,7 @@
   /**
    * @brief Create segment number component using NDN naming conventions
    *
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    */
   static Component
   fromSegment(uint64_t segmentNo);
@@ -458,7 +454,7 @@
   /**
    * @brief Create byte offset component using NDN naming conventions
    *
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    */
   static Component
   fromByteOffset(uint64_t offset);
@@ -473,7 +469,7 @@
   /**
    * @brief Create sequence number component using NDN naming conventions
    *
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    */
   static Component
   fromTimestamp(const time::system_clock::TimePoint& timePoint);
@@ -481,7 +477,7 @@
   /**
    * @brief Create sequence number component using NDN naming conventions
    *
-   * @sa NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf
+   * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
    */
   static Component
   fromSequenceNumber(uint64_t seqNo);
diff --git a/tests/unit/name-component.t.cpp b/tests/unit/name-component.t.cpp
index 4ee25ea..c009175 100644
--- a/tests/unit/name-component.t.cpp
+++ b/tests/unit/name-component.t.cpp
@@ -26,6 +26,8 @@
 #include "tests/boost-test.hpp"
 
 #include <boost/algorithm/string/case_conv.hpp>
+#include <boost/algorithm/string/predicate.hpp>
+#include <boost/lexical_cast.hpp>
 #include <boost/mpl/vector.hpp>
 
 namespace ndn {
@@ -36,11 +38,17 @@
 
 BOOST_AUTO_TEST_SUITE(Decode)
 
+#define CHECK_COMP_ERR(expr, whatstring) \
+  BOOST_CHECK_EXCEPTION(expr, Component::Error, \
+                        [] (const auto& e) { return boost::contains(e.what(), whatstring); })
+
 BOOST_AUTO_TEST_CASE(Generic)
 {
   Component comp("0807 6E646E2D637878"_block);
   BOOST_CHECK_EQUAL(comp.type(), tlv::GenericNameComponent);
+  BOOST_CHECK_EQUAL(comp.isGeneric(), true);
   BOOST_CHECK_EQUAL(comp.toUri(), "ndn-cxx");
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(comp), "ndn-cxx");
   BOOST_CHECK_EQUAL(Component::fromEscapedString("ndn-cxx"), comp);
   BOOST_CHECK_EQUAL(Component::fromEscapedString("8=ndn-cxx"), comp);
 
@@ -82,38 +90,96 @@
 }
 
 static void
-testSha256(uint32_t type, const std::string& uriPrefix)
+testSha256Component(uint32_t type, const std::string& uriPrefix)
 {
-  std::string hexLower = "28bad4b5275bd392dbb670c75cf0b66f13f7942b21e80f55c0e86b374753a548";
-  std::string hexUpper = boost::to_upper_copy(hexLower);
+  const std::string hexLower = "28bad4b5275bd392dbb670c75cf0b66f13f7942b21e80f55c0e86b374753a548";
+  const std::string hexUpper = boost::to_upper_copy(hexLower);
   std::string hexPct;
   for (size_t i = 0; i < hexUpper.size(); i += 2) {
     hexPct += "%" + hexUpper.substr(i, 2);
   }
 
   Component comp(Block(type, fromHex(hexLower)));
+
   BOOST_CHECK_EQUAL(comp.type(), type);
   BOOST_CHECK_EQUAL(comp.toUri(), uriPrefix + hexLower);
-  BOOST_CHECK_EQUAL(Component::fromEscapedString(uriPrefix + hexLower), comp);
-  BOOST_CHECK_EQUAL(Component::fromEscapedString(uriPrefix + hexUpper), comp);
-  BOOST_CHECK_EQUAL(Component::fromEscapedString(to_string(type) + "=" + hexPct), comp);
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(comp), uriPrefix + hexLower);
+  BOOST_CHECK_EQUAL(comp, Component::fromEscapedString(uriPrefix + hexLower));
+  BOOST_CHECK_EQUAL(comp, Component::fromEscapedString(uriPrefix + hexUpper));
+  BOOST_CHECK_EQUAL(comp, Component::fromEscapedString(to_string(type) + "=" + hexPct));
 
-  BOOST_CHECK_THROW(comp.wireDecode(Block(type, fromHex("A791806951F25C4D"))), Component::Error);
-  BOOST_CHECK_THROW(Component::fromEscapedString(uriPrefix), Component::Error);
-  BOOST_CHECK_THROW(Component::fromEscapedString(uriPrefix + "a791806951f25c4d"),
-                    Component::Error);
-  BOOST_CHECK_THROW(Component::fromEscapedString(boost::to_upper_copy(uriPrefix) + hexLower),
-                    Component::Error);
+  CHECK_COMP_ERR(comp.wireDecode(Block(type, fromHex("A791806951F25C4D"))), "TLV-LENGTH must be 32");
+  CHECK_COMP_ERR(Component::fromEscapedString(uriPrefix), "TLV-LENGTH must be 32");
+  CHECK_COMP_ERR(Component::fromEscapedString(uriPrefix + "a791806951f25c4d"), "TLV-LENGTH must be 32");
+  CHECK_COMP_ERR(Component::fromEscapedString(uriPrefix + "foo"), "invalid hex encoding");
+  CHECK_COMP_ERR(Component::fromEscapedString(boost::to_upper_copy(uriPrefix) + hexLower), "Unknown TLV-TYPE");
 }
 
-BOOST_AUTO_TEST_CASE(Digest)
+BOOST_AUTO_TEST_CASE(ImplicitDigest)
 {
-  testSha256(tlv::ImplicitSha256DigestComponent, "sha256digest=");
+  testSha256Component(tlv::ImplicitSha256DigestComponent, "sha256digest=");
 }
 
-BOOST_AUTO_TEST_CASE(Params)
+BOOST_AUTO_TEST_CASE(ParametersDigest)
 {
-  testSha256(tlv::ParametersSha256DigestComponent, "params-sha256=");
+  testSha256Component(tlv::ParametersSha256DigestComponent, "params-sha256=");
+}
+
+static void
+testDecimalComponent(uint32_t type, const std::string& uriPrefix)
+{
+  const Component comp(makeNonNegativeIntegerBlock(type, 42)); // TLV-VALUE is a nonNegativeInteger
+  BOOST_CHECK_EQUAL(comp.type(), type);
+  BOOST_CHECK_EQUAL(comp.isNumber(), true);
+  const auto compUri = uriPrefix + "42";
+  BOOST_CHECK_EQUAL(comp.toUri(), compUri);
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(comp), compUri);
+  BOOST_CHECK_EQUAL(comp, Component::fromEscapedString(compUri));
+  BOOST_CHECK_EQUAL(comp, Component::fromEscapedString(to_string(type) + "=%2A"));
+  BOOST_CHECK_EQUAL(comp, Component::fromNumber(42, type));
+
+  const Component comp2(Block(type, fromHex("010203"))); // TLV-VALUE is *not* a nonNegativeInteger
+  BOOST_CHECK_EQUAL(comp2.type(), type);
+  BOOST_CHECK_EQUAL(comp2.isNumber(), false);
+  const auto comp2Uri = to_string(type) + "=%01%02%03";
+  BOOST_CHECK_EQUAL(comp2.toUri(), comp2Uri);
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(comp2), comp2Uri);
+  BOOST_CHECK_EQUAL(comp2, Component::fromEscapedString(comp2Uri));
+
+  CHECK_COMP_ERR(Component::fromEscapedString(uriPrefix), "invalid format");
+  CHECK_COMP_ERR(Component::fromEscapedString(uriPrefix + "foo"), "invalid format");
+  CHECK_COMP_ERR(Component::fromEscapedString(uriPrefix + "00"), "invalid format");
+  CHECK_COMP_ERR(Component::fromEscapedString(uriPrefix + "-1"), "invalid format");
+  CHECK_COMP_ERR(Component::fromEscapedString(uriPrefix + "9.3"), "invalid format");
+  CHECK_COMP_ERR(Component::fromEscapedString(uriPrefix + " 84"), "invalid format");
+  CHECK_COMP_ERR(Component::fromEscapedString(uriPrefix + "0xAF"), "invalid format");
+  CHECK_COMP_ERR(Component::fromEscapedString(uriPrefix + "18446744073709551616"), "out of range");
+  CHECK_COMP_ERR(Component::fromEscapedString(boost::to_upper_copy(uriPrefix) + "42"), "Unknown TLV-TYPE");
+}
+
+BOOST_AUTO_TEST_CASE(Segment)
+{
+  testDecimalComponent(tlv::SegmentNameComponent, "seg=");
+}
+
+BOOST_AUTO_TEST_CASE(ByteOffset)
+{
+  testDecimalComponent(tlv::ByteOffsetNameComponent, "off=");
+}
+
+BOOST_AUTO_TEST_CASE(Version)
+{
+  testDecimalComponent(tlv::VersionNameComponent, "v=");
+}
+
+BOOST_AUTO_TEST_CASE(Timestamp)
+{
+  testDecimalComponent(tlv::TimestampNameComponent, "t=");
+}
+
+BOOST_AUTO_TEST_CASE(SequenceNum)
+{
+  testDecimalComponent(tlv::SequenceNumNameComponent, "seq=");
 }
 
 BOOST_AUTO_TEST_CASE(OtherType)
@@ -165,7 +231,7 @@
 
 BOOST_AUTO_TEST_CASE(Compare)
 {
-  std::vector<Component> comps = {
+  const std::vector<Component> comps = {
     Component("0120 0000000000000000000000000000000000000000000000000000000000000000"_block),
     Component("0120 0000000000000000000000000000000000000000000000000000000000000001"_block),
     Component("0120 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"_block),
@@ -202,12 +268,10 @@
 
 BOOST_AUTO_TEST_SUITE(CreateFromIterators) // Bug 2490
 
-typedef boost::mpl::vector<
-  std::vector<uint8_t>,
-  std::list<uint8_t>,
-  std::vector<int8_t>,
-  std::list<int8_t>
-> ContainerTypes;
+using ContainerTypes = boost::mpl::vector<std::vector<uint8_t>,
+                                          std::list<uint8_t>,
+                                          std::vector<int8_t>,
+                                          std::list<int8_t>>;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(ZeroOctet, T, ContainerTypes)
 {
@@ -243,12 +307,12 @@
 template<typename ArgType>
 struct ConventionTest
 {
-  function<Component(ArgType)> makeComponent;
-  function<ArgType(const Component&)> getValue;
-  function<Name&(Name&, ArgType)> append;
+  std::function<Component(ArgType)> makeComponent;
+  std::function<ArgType(const Component&)> getValue;
+  std::function<Name&(Name&, ArgType)> append;
   Name expected;
   ArgType value;
-  function<bool(const Component&)> isComponent;
+  std::function<bool(const Component&)> isComponent;
 };
 
 class ConventionMarker
@@ -478,7 +542,7 @@
   auto test = T()();
 
   const Name& expected = test.expected;
-  BOOST_TEST_MESSAGE("Check " << expected[0].toUri());
+  BOOST_TEST_MESSAGE("Check " << expected[0]);
 
   Component actualComponent = test.makeComponent(test.value);
   BOOST_CHECK_EQUAL(actualComponent, expected[0]);
diff --git a/tests/unit/name.t.cpp b/tests/unit/name.t.cpp
index 362f443..44c261e 100644
--- a/tests/unit/name.t.cpp
+++ b/tests/unit/name.t.cpp
@@ -323,7 +323,7 @@
   const time::system_clock::TimePoint tp = time::system_clock::now();
   time::system_clock::TimePoint tp2;
   BOOST_REQUIRE_NO_THROW(tp2 = name.appendTimestamp(tp).at(-1).toTimestamp());
-  BOOST_CHECK_LE(std::abs(time::duration_cast<time::microseconds>(tp2 - tp).count()), 1);
+  BOOST_CHECK_LE(time::abs(tp2 - tp), 1_us);
 
   BOOST_REQUIRE_NO_THROW(number = name.appendSequenceNumber(11676).at(-1).toSequenceNumber());
   BOOST_CHECK_EQUAL(number, 11676);
