diff --git a/tests/daemon/face/factory-test-common.hpp b/tests/daemon/face/factory-test-common.hpp
index 15b3621..7b7bdf6 100644
--- a/tests/daemon/face/factory-test-common.hpp
+++ b/tests/daemon/face/factory-test-common.hpp
@@ -37,8 +37,8 @@
 struct TestFaceParams : public FaceParams
 {
   TestFaceParams(ndn::nfd::FacePersistency persistency,
-                 ndn::optional<time::nanoseconds> baseCongestionMarkingInterval,
-                 ndn::optional<uint64_t> defaultCongestionThreshold,
+                 optional<time::nanoseconds> baseCongestionMarkingInterval,
+                 optional<uint64_t> defaultCongestionThreshold,
                  bool wantLocalFields,
                  bool wantLpReliability,
                  boost::logic::tribool wantCongestionMarking) noexcept
@@ -62,7 +62,7 @@
 inline void
 createFace(ProtocolFactory& factory,
            const FaceUri& remoteUri,
-           const ndn::optional<FaceUri>& localUri,
+           const optional<FaceUri>& localUri,
            const TestFaceParams& params,
            const CreateFaceExpectedResult& expected,
            const std::function<void(const Face&)>& extraChecks = nullptr)
diff --git a/tests/daemon/fw/best-route-strategy2.t.cpp b/tests/daemon/fw/best-route-strategy2.t.cpp
index 3ebe7f1..2337e07 100644
--- a/tests/daemon/fw/best-route-strategy2.t.cpp
+++ b/tests/daemon/fw/best-route-strategy2.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -100,7 +100,7 @@
   scheduler::EventId retxFrom4Evt;
   size_t nSentLast = strategy.sendInterestHistory.size();
   time::steady_clock::TimePoint timeSentLast = time::steady_clock::now();
-  function<void()> periodicalRetxFrom4; // let periodicalRetxFrom4 lambda capture itself
+  std::function<void()> periodicalRetxFrom4; // let periodicalRetxFrom4 lambda capture itself
   periodicalRetxFrom4 = [&] {
     pitEntry->insertOrUpdateInRecord(*face4, *interest);
     strategy.afterReceiveInterest(*face4, *interest, pitEntry);
diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index a5118d8..82a93ea 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -190,7 +190,7 @@
 
 protected:
   void
-  dispatchToStrategy(pit::Entry& pitEntry, function<void(fw::Strategy&)> trigger) override
+  dispatchToStrategy(pit::Entry&, std::function<void(fw::Strategy&)>) override
   {
     ++dispatchToStrategy_count;
   }
diff --git a/tests/daemon/fw/multicast-strategy.t.cpp b/tests/daemon/fw/multicast-strategy.t.cpp
index 07e854c..d57f801 100644
--- a/tests/daemon/fw/multicast-strategy.t.cpp
+++ b/tests/daemon/fw/multicast-strategy.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -99,7 +99,7 @@
   scheduler::EventId retxFrom4Evt;
   size_t nSentLast = strategy.sendInterestHistory.size();
   time::steady_clock::TimePoint timeSentLast = time::steady_clock::now();
-  function<void()> periodicalRetxFrom4; // let periodicalRetxFrom4 lambda capture itself
+  std::function<void()> periodicalRetxFrom4; // let periodicalRetxFrom4 lambda capture itself
   periodicalRetxFrom4 = [&] {
     pitEntry->insertOrUpdateInRecord(*face3, *interest);
     strategy.afterReceiveInterest(*face3, *interest, pitEntry);
diff --git a/tests/daemon/mgmt/command-authenticator.t.cpp b/tests/daemon/mgmt/command-authenticator.t.cpp
index ce4ab53..5f55451 100644
--- a/tests/daemon/mgmt/command-authenticator.t.cpp
+++ b/tests/daemon/mgmt/command-authenticator.t.cpp
@@ -60,7 +60,7 @@
 
   bool
   authorize(const std::string& module, const Name& identity,
-            const function<void(Interest&)>& modifyInterest = nullptr)
+            const std::function<void(Interest&)>& modifyInterest = nullptr)
   {
     Interest interest = this->makeControlCommandRequest(Name("/prefix/" + module + "/verb"),
                                                         ControlParameters(), identity);
@@ -262,7 +262,7 @@
   }
 
   bool
-  authorize1(const function<void(Interest&)>& modifyInterest)
+  authorize1(const std::function<void(Interest&)>& modifyInterest)
   {
     return authorize("module1", id1, modifyInterest);
   }
diff --git a/tests/daemon/mgmt/face-manager-update-face.t.cpp b/tests/daemon/mgmt/face-manager-update-face.t.cpp
index 904b550..15bf6dd 100644
--- a/tests/daemon/mgmt/face-manager-update-face.t.cpp
+++ b/tests/daemon/mgmt/face-manager-update-face.t.cpp
@@ -53,8 +53,8 @@
   void
   createFace(const std::string& uri = "tcp4://127.0.0.1:26363",
              ndn::nfd::FacePersistency persistency = ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
-             ndn::optional<time::nanoseconds> baseCongestionMarkingInterval = {},
-             ndn::optional<uint64_t> defaultCongestionThreshold = {},
+             optional<time::nanoseconds> baseCongestionMarkingInterval = {},
+             optional<uint64_t> defaultCongestionThreshold = {},
              bool enableLocalFields = false,
              bool enableReliability = false,
              boost::logic::tribool enableCongestionMarking = boost::logic::indeterminate)
@@ -127,7 +127,7 @@
   void
   updateFace(const ControlParameters& requestParams,
              bool isSelfUpdating,
-             const function<void(const ControlResponse& resp)>& checkResp)
+             const std::function<void(const ControlResponse& resp)>& checkResp)
   {
     Interest req = makeControlCommandRequest("/localhost/nfd/faces/update", requestParams);
     if (isSelfUpdating) {
diff --git a/tests/daemon/mgmt/fib-manager.t.cpp b/tests/daemon/mgmt/fib-manager.t.cpp
index 428b15b..e2986bc 100644
--- a/tests/daemon/mgmt/fib-manager.t.cpp
+++ b/tests/daemon/mgmt/fib-manager.t.cpp
@@ -35,8 +35,6 @@
 namespace nfd {
 namespace tests {
 
-using ndn::nullopt;
-
 class FibManagerFixture : public NfdManagerCommonFixture
 {
 public:
@@ -98,9 +96,9 @@
    */
   CheckNextHopResult
   checkNextHop(const Name& prefix,
-               ndn::optional<size_t> expectedNNextHops = nullopt,
-               ndn::optional<FaceId> faceId = nullopt,
-               ndn::optional<uint64_t> expectedCost = nullopt) const
+               optional<size_t> expectedNNextHops = nullopt,
+               optional<FaceId> faceId = nullopt,
+               optional<uint64_t> expectedCost = nullopt) const
   {
     const fib::Entry* entry = m_fib.findExactMatch(prefix);
     if (entry == nullptr) {
diff --git a/tests/daemon/table/cs.t.cpp b/tests/daemon/table/cs.t.cpp
index 66b7e95..a8363de 100644
--- a/tests/daemon/table/cs.t.cpp
+++ b/tests/daemon/table/cs.t.cpp
@@ -28,6 +28,8 @@
 #include "tests/test-common.hpp"
 
 #include <cstring>
+
+#include <ndn-cxx/exclude.hpp>
 #include <ndn-cxx/lp/tags.hpp>
 #include <ndn-cxx/util/sha256.hpp>
 
@@ -92,7 +94,7 @@
   size_t
   erase(const Name& prefix, size_t limit)
   {
-    ndn::optional<size_t> nErased;
+    optional<size_t> nErased;
     m_cs.erase(prefix, limit, [&] (size_t nErased1) { nErased = nErased1; });
 
     // current Cs::erase implementation is synchronous
@@ -331,7 +333,7 @@
   uint8_t digestFF[ndn::util::Sha256::DIGEST_SIZE];
   std::fill_n(digestFF, sizeof(digestFF), 0xFF);
 
-  Exclude excludeDigest;
+  ndn::Exclude excludeDigest;
   excludeDigest.excludeRange(
     name::Component::fromImplicitSha256Digest(digest00, sizeof(digest00)),
     name::Component::fromImplicitSha256Digest(digestFF, sizeof(digestFF)));
@@ -346,7 +348,7 @@
     .setExclude(excludeDigest);
   CHECK_CS_FIND(3);
 
-  Exclude excludeGeneric;
+  ndn::Exclude excludeGeneric;
   excludeGeneric.excludeAfter(name::Component(static_cast<uint8_t*>(nullptr), 0));
 
   startInterest("/A")
@@ -359,7 +361,7 @@
     .setExclude(excludeGeneric);
   find([] (uint32_t found) { BOOST_CHECK(found == 1 || found == 2); });
 
-  Exclude exclude2 = excludeGeneric;
+  ndn::Exclude exclude2 = excludeGeneric;
   exclude2.excludeOne(n2.get(-1));
 
   startInterest("/A")
diff --git a/tests/daemon/table/pit.t.cpp b/tests/daemon/table/pit.t.cpp
index c883ff4..511f2aa 100644
--- a/tests/daemon/table/pit.t.cpp
+++ b/tests/daemon/table/pit.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017,  Regents of the University of California,
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -24,10 +24,12 @@
  */
 
 #include "table/pit.hpp"
-#include "tests/daemon/face/dummy-face.hpp"
 
+#include "tests/daemon/face/dummy-face.hpp"
 #include "tests/test-common.hpp"
 
+#include <ndn-cxx/exclude.hpp>
+
 namespace nfd {
 namespace pit {
 namespace tests {
@@ -60,9 +62,9 @@
 {
   Name name1("ndn:/5vzBNnMst");
   Name name2("ndn:/igSGfEIM62");
-  Exclude exclude1;
+  ndn::Exclude exclude1;
   exclude1.excludeOne(Name::Component("u26p47oep"));
-  Exclude exclude2;
+  ndn::Exclude exclude2;
   exclude2.excludeBefore(Name::Component("u26p47oep"));
   ndn::KeyLocator keyLocator1("ndn:/sGAE3peMHA");
   ndn::KeyLocator keyLocator2("ndn:/nIJH6pr4");
diff --git a/tests/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp b/tests/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp
index 6535a87..6925de1 100644
--- a/tests/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp
+++ b/tests/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -46,7 +46,7 @@
   RibRouteRef rrr{entry, routeIt};
 
   ClientToNlsrReadvertisePolicy policy;
-  ndn::optional<ReadvertiseAction> action = policy.handleNewRoute(rrr);
+  optional<ReadvertiseAction> action = policy.handleNewRoute(rrr);
 
   BOOST_REQUIRE(action);
   BOOST_CHECK_EQUAL(action->prefix, "/test/A");
@@ -63,7 +63,7 @@
   RibRouteRef rrr{entry, routeIt};
 
   ClientToNlsrReadvertisePolicy policy;
-  ndn::optional<ReadvertiseAction> action = policy.handleNewRoute(rrr);
+  optional<ReadvertiseAction> action = policy.handleNewRoute(rrr);
 
   BOOST_CHECK(!action);
 }
diff --git a/tests/rib/readvertise/readvertise.t.cpp b/tests/rib/readvertise/readvertise.t.cpp
index 14949b8..5de7208 100644
--- a/tests/rib/readvertise/readvertise.t.cpp
+++ b/tests/rib/readvertise/readvertise.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -25,8 +25,8 @@
 
 #include "rib/readvertise/readvertise.hpp"
 
-#include "tests/test-common.hpp"
 #include "tests/identity-management-fixture.hpp"
+
 #include <ndn-cxx/mgmt/nfd/controller.hpp>
 #include <ndn-cxx/util/dummy-client-face.hpp>
 #include <boost/range/adaptor/transformed.hpp>
@@ -41,7 +41,7 @@
 class DummyReadvertisePolicy : public ReadvertisePolicy
 {
 public:
-  ndn::optional<ReadvertiseAction>
+  optional<ReadvertiseAction>
   handleNewRoute(const RibRouteRef& route) const override
   {
     return this->decision;
@@ -54,7 +54,7 @@
   }
 
 public:
-  ndn::optional<ReadvertiseAction> decision;
+  optional<ReadvertiseAction> decision;
 };
 
 class DummyReadvertiseDestination : public ReadvertiseDestination
@@ -195,7 +195,7 @@
 
 BOOST_AUTO_TEST_CASE(NoAdvertise)
 {
-  policy->decision = ndn::nullopt;
+  policy->decision = nullopt;
 
   this->insertRoute("/A/1", 1, ndn::nfd::ROUTE_ORIGIN_CLIENT);
   this->insertRoute("/A/2", 1, ndn::nfd::ROUTE_ORIGIN_CLIENT);
diff --git a/tests/rib/rib-manager.t.cpp b/tests/rib/rib-manager.t.cpp
index 55ae1c8..cdf1581 100644
--- a/tests/rib/rib-manager.t.cpp
+++ b/tests/rib/rib-manager.t.cpp
@@ -452,7 +452,7 @@
     Route route;
     route.faceId = ++faceId;
     route.cost = route.faceId * 10;
-    route.expires = ndn::nullopt;
+    route.expires = nullopt;
     return route;
   };
 
diff --git a/tests/rib/rib.t.cpp b/tests/rib/rib.t.cpp
index e572a72..420a82d 100644
--- a/tests/rib/rib.t.cpp
+++ b/tests/rib/rib.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -291,17 +291,17 @@
 
   Route root = createRoute(1, 20);
   Name name1("/");
-  root.expires = ndn::nullopt;
+  root.expires = nullopt;
   rib.insert(name1, root);
 
   Route route1 = createRoute(2, 20);
   Name name2("/hello");
-  route1.expires = ndn::nullopt;
+  route1.expires = nullopt;
   rib.insert(name2, route1);
 
   Route route2 = createRoute(3, 20);
   Name name3("/hello/world");
-  route2.expires = ndn::nullopt;
+  route2.expires = nullopt;
   rib.insert(name3, route2);
 
   const std::string ribStr = std::string(R"TEXT(
diff --git a/tests/rib/route.t.cpp b/tests/rib/route.t.cpp
index d7b70eb..4d66d0d 100644
--- a/tests/rib/route.t.cpp
+++ b/tests/rib/route.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -24,6 +24,7 @@
  */
 
 #include "rib/route.hpp"
+
 #include "tests/test-common.hpp"
 
 namespace nfd {
@@ -63,9 +64,9 @@
   BOOST_CHECK_NE(a, b);
   a.cost = 103;
 
-  b.expires = ndn::nullopt;
+  b.expires = nullopt;
   BOOST_CHECK_NE(a, b);
-  a.expires = ndn::nullopt;
+  a.expires = nullopt;
 
   BOOST_CHECK_EQUAL(a, b);
 }
@@ -84,7 +85,7 @@
   BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(r),
                     "Route(faceid: 4980, origin: static, cost: 2312, flags: 0x1, expires in: 791214234 milliseconds)");
 
-  r.expires = ndn::nullopt;
+  r.expires = nullopt;
   BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(r),
                     "Route(faceid: 4980, origin: static, cost: 2312, flags: 0x1, never expires)");
 }
diff --git a/tests/tools/mock-nfd-mgmt-fixture.hpp b/tests/tools/mock-nfd-mgmt-fixture.hpp
index d0498e5..eb102eb 100644
--- a/tests/tools/mock-nfd-mgmt-fixture.hpp
+++ b/tests/tools/mock-nfd-mgmt-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017,  Regents of the University of California,
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -64,11 +64,11 @@
    *  \retval nullopt last Interest is not the expected command
    *  \return command parameters
    */
-  static ndn::optional<ControlParameters>
+  static optional<ControlParameters>
   parseCommand(const Interest& interest, const Name& expectedPrefix)
   {
     if (!expectedPrefix.isPrefixOf(interest.getName())) {
-      return ndn::nullopt;
+      return nullopt;
     }
     return ControlParameters(interest.getName().at(expectedPrefix.size()).blockFromValue());
   }
diff --git a/tests/tools/nfdc/status-report.t.cpp b/tests/tools/nfdc/status-report.t.cpp
index fbe212c..5cd25f9 100644
--- a/tests/tools/nfdc/status-report.t.cpp
+++ b/tests/tools/nfdc/status-report.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -69,11 +69,11 @@
     m_delay = delay;
   }
 
-  virtual void
+  void
   fetchStatus(Controller& controller,
-              const function<void()>& onSuccess,
+              const std::function<void()>& onSuccess,
               const Controller::DatasetFailCallback& onFailure,
-              const CommandOptions& options) override
+              const CommandOptions& options) final
   {
     ++nFetchStatusCalls;
     scheduler::schedule(m_delay, [=] {
@@ -86,14 +86,14 @@
     });
   }
 
-  virtual void
-  formatStatusXml(std::ostream& os) const override
+  void
+  formatStatusXml(std::ostream& os) const final
   {
     os << '<' << m_moduleName << "/>";
   }
 
-  virtual void
-  formatStatusText(std::ostream& os) const override
+  void
+  formatStatusText(std::ostream& os) const final
   {
     os << m_moduleName << '\n';
   }
@@ -110,7 +110,7 @@
 class StatusReportTester : public StatusReport
 {
 private:
-  virtual void
+  void
   processEvents(Face&) override
   {
     processEventsFunc();
