name: New method to get "successor" of a name

Change-Id: I41a53e64994970121766bc92cd9dd4796ba5fcfb
refs #1677
diff --git a/tests/unit-tests/test-name.cpp b/tests/unit-tests/test-name.cpp
index e5f438d..dd9cc78 100644
--- a/tests/unit-tests/test-name.cpp
+++ b/tests/unit-tests/test-name.cpp
@@ -128,6 +128,14 @@
     }
 }
 
+BOOST_AUTO_TEST_CASE(GetSuccessor)
+{
+  BOOST_CHECK_EQUAL(Name("ndn:/%00%01/%01%02").getSuccessor(), Name("ndn:/%00%01/%01%03"));
+  BOOST_CHECK_EQUAL(Name("ndn:/%00%01/%01%FF").getSuccessor(), Name("ndn:/%00%01/%02%00"));
+  BOOST_CHECK_EQUAL(Name("ndn:/%00%01/%FF%FF").getSuccessor(), Name("ndn:/%00%01/%00%00%00"));
+  BOOST_CHECK_EQUAL(Name().getSuccessor(), Name("ndn:/%00"));
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace ndn