encoding/tlv: Updating type assignment and fixing test cases
Type assignment now reflects the latest NDN-TLV spec.
Change-Id: Ibcd73a81ac72ebbd2897006f49518156aa9981a3
diff --git a/tests_boost/test-encode-decode-interest.cpp b/tests_boost/test-encode-decode-interest.cpp
index ca2ffeb..32a319e 100644
--- a/tests_boost/test-encode-decode-interest.cpp
+++ b/tests_boost/test-encode-decode-interest.cpp
@@ -14,29 +14,39 @@
BOOST_AUTO_TEST_SUITE(TestInterest)
const uint8_t Interest1[] = {
- 0x0, 0x41,
- 0x2, 0x14,
- 0x3, 0x5, 0x6c, 0x6f, 0x63, 0x61, 0x6c,
- 0x3, 0x3, 0x6e, 0x64, 0x6e,
- 0x3, 0x6, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78,
- 0x4, 0x1f,
- 0x8, 0x1, 0x1,
- 0x9, 0x1, 0x1,
- 0xb, 0x14,
- 0x3, 0x4, 0x61, 0x6c, 0x65, 0x78,
- 0x3, 0x4, 0x78, 0x78, 0x78, 0x78,
- 0xe, 0x0,
- 0x3, 0x4, 0x79, 0x79, 0x79, 0x79,
- 0xc, 0x1, 0x1,
- 0x5, 0x1, 0x1,
- 0x6, 0x1, 0x1,
- 0x7, 0x2, 0x3, 0xe8
+ 0x1, 0x41, // NDN Interest
+ 0x3, 0x14, // Name
+ 0x4, 0x5, // NameComponent
+ 0x6c, 0x6f, 0x63, 0x61, 0x6c,
+ 0x4, 0x3, // NameComponent
+ 0x6e, 0x64, 0x6e,
+ 0x4, 0x6, // NameComponent
+ 0x70, 0x72, 0x65, 0x66, 0x69, 0x78,
+ 0x5, 0x1f, // Selectors
+ 0x09, 0x1, 0x1, // MinSuffix
+ 0x0a, 0x1, 0x1, // MaxSuffix
+ 0x0c, 0x14, // Exclude
+ 0x4, 0x4, // NameComponent
+ 0x61, 0x6c, 0x65, 0x78,
+ 0x4, 0x4, // NameComponent
+ 0x78, 0x78, 0x78, 0x78,
+ 0xf, 0x0, // Any
+ 0x4, 0x4, // NameComponent
+ 0x79, 0x79, 0x79, 0x79,
+ 0x0d, 0x1, // ChildSelector
+ 0x1,
+ 0x6, 0x1, // Nonce
+ 0x1,
+ 0x7, 0x1, // Scope
+ 0x1,
+ 0x8, // InterestLifetime
+ 0x2, 0x3, 0xe8
};
BOOST_AUTO_TEST_CASE (Decode)
{
Block interestBlock(Interest1, sizeof(Interest1));
-
+
ndn::Interest i;
BOOST_REQUIRE_NO_THROW(i.wireDecode(interestBlock));