blob: ddd76297858f6ca7008c25706bc92915b411676c [file] [log] [blame]
Junxiao Shidf4b24e2016-07-14 21:41:43 +00001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
Junxiao Shi71ff2312017-07-12 13:32:50 +00002/*
Davide Pesavento0f830802018-01-16 23:58:58 -05003 * Copyright (c) 2013-2018 Regents of the University of California.
Junxiao Shidf4b24e2016-07-14 21:41:43 +00004 *
5 * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
6 *
7 * ndn-cxx library is free software: you can redistribute it and/or modify it under the
8 * terms of the GNU Lesser General Public License as published by the Free Software
9 * Foundation, either version 3 of the License, or (at your option) any later version.
10 *
11 * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14 *
15 * You should have received copies of the GNU General Public License and GNU Lesser
16 * General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see
17 * <http://www.gnu.org/licenses/>.
18 *
19 * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
20 */
21
22#include "name-component.hpp"
Junxiao Shi71ff2312017-07-12 13:32:50 +000023#include "name.hpp"
Junxiao Shi4053bd52018-08-16 13:39:25 -060024#include "util/string-helper.hpp"
Junxiao Shidf4b24e2016-07-14 21:41:43 +000025
Junxiao Shicf4ac5b2018-03-28 22:46:06 +000026#include "block-literal.hpp"
Junxiao Shidf4b24e2016-07-14 21:41:43 +000027#include "boost-test.hpp"
Junxiao Shi4053bd52018-08-16 13:39:25 -060028#include <boost/algorithm/string/case_conv.hpp>
Junxiao Shidf4b24e2016-07-14 21:41:43 +000029#include <boost/mpl/vector.hpp>
30
31namespace ndn {
Junxiao Shicf4ac5b2018-03-28 22:46:06 +000032namespace name {
Junxiao Shidf4b24e2016-07-14 21:41:43 +000033namespace tests {
34
Junxiao Shicf4ac5b2018-03-28 22:46:06 +000035using namespace ndn::tests;
Junxiao Shidf4b24e2016-07-14 21:41:43 +000036
Junxiao Shicf4ac5b2018-03-28 22:46:06 +000037BOOST_AUTO_TEST_SUITE(TestNameComponent)
Junxiao Shidf4b24e2016-07-14 21:41:43 +000038
39BOOST_AUTO_TEST_SUITE(Decode)
40
41BOOST_AUTO_TEST_CASE(Generic)
42{
Junxiao Shicf4ac5b2018-03-28 22:46:06 +000043 Component comp("0807 6E646E2D637878"_block);
44 BOOST_CHECK_EQUAL(comp.type(), tlv::GenericNameComponent);
45 BOOST_CHECK_EQUAL(comp.toUri(), "ndn-cxx");
46 BOOST_CHECK_EQUAL(Component::fromEscapedString("ndn-cxx"), comp);
Junxiao Shid2e60632018-08-10 10:48:44 -060047 BOOST_CHECK_EQUAL(Component::fromEscapedString("8=ndn-cxx"), comp);
Junxiao Shicf4ac5b2018-03-28 22:46:06 +000048
49 comp.wireDecode("0800"_block);
50 BOOST_CHECK_EQUAL(comp.toUri(), "...");
51 BOOST_CHECK_EQUAL(Component::fromEscapedString("..."), comp);
Junxiao Shid2e60632018-08-10 10:48:44 -060052 BOOST_CHECK_EQUAL(Component::fromEscapedString("8=..."), comp);
Junxiao Shicf4ac5b2018-03-28 22:46:06 +000053 BOOST_CHECK_EQUAL(Component::fromEscapedString(".%2E."), comp);
54
55 comp.wireDecode("0801 2E"_block);
56 BOOST_CHECK_EQUAL(comp.toUri(), "....");
57 BOOST_CHECK_EQUAL(Component::fromEscapedString("...."), comp);
58 BOOST_CHECK_EQUAL(Component::fromEscapedString("%2E..%2E"), comp);
59
60 comp.wireDecode("0803 2E412E"_block);
61 BOOST_CHECK_EQUAL(comp.toUri(), ".A.");
62 BOOST_CHECK_EQUAL(Component::fromEscapedString(".A."), comp);
63
64 comp.wireDecode("0807 666F6F25626172"_block);
65 BOOST_CHECK_EQUAL(comp.toUri(), "foo%25bar");
66 BOOST_CHECK_EQUAL(Component::fromEscapedString("foo%25bar"), comp);
Junxiao Shid2e60632018-08-10 10:48:44 -060067 BOOST_CHECK_EQUAL(Component::fromEscapedString("8=foo%25bar"), comp);
Junxiao Shicf4ac5b2018-03-28 22:46:06 +000068
69 comp.wireDecode("0804 2D2E5F7E"_block);
70 BOOST_CHECK_EQUAL(comp.toUri(), "-._~");
71 BOOST_CHECK_EQUAL(Component::fromEscapedString("-._~"), comp);
72
Junxiao Shid2e60632018-08-10 10:48:44 -060073 comp.wireDecode("0803 393D41"_block);
74 BOOST_CHECK_EQUAL(comp.toUri(), "9%3DA");
75 BOOST_CHECK_EQUAL(Component::fromEscapedString("9%3DA"), comp);
76
Junxiao Shicf4ac5b2018-03-28 22:46:06 +000077 comp = Component(":/?#[]@");
78 BOOST_CHECK_EQUAL(comp.toUri(), "%3A%2F%3F%23%5B%5D%40");
79 BOOST_CHECK_EQUAL(Component::fromEscapedString("%3A%2F%3F%23%5B%5D%40"), comp);
80
81 BOOST_CHECK_THROW(Component::fromEscapedString(""), Component::Error);
82 BOOST_CHECK_THROW(Component::fromEscapedString("."), Component::Error);
83 BOOST_CHECK_THROW(Component::fromEscapedString(".."), Component::Error);
Junxiao Shidf4b24e2016-07-14 21:41:43 +000084}
85
Junxiao Shi4053bd52018-08-16 13:39:25 -060086static void
87testSha256(uint32_t type, const std::string& uriPrefix)
Junxiao Shidf4b24e2016-07-14 21:41:43 +000088{
Junxiao Shicf4ac5b2018-03-28 22:46:06 +000089 std::string hexLower = "28bad4b5275bd392dbb670c75cf0b66f13f7942b21e80f55c0e86b374753a548";
Junxiao Shi4053bd52018-08-16 13:39:25 -060090 std::string hexUpper = boost::to_upper_copy(hexLower);
91 std::string hexPct;
92 for (size_t i = 0; i < hexUpper.size(); i += 2) {
93 hexPct += "%" + hexUpper.substr(i, 2);
94 }
Junxiao Shicf4ac5b2018-03-28 22:46:06 +000095
Junxiao Shi4053bd52018-08-16 13:39:25 -060096 Component comp(Block(type, fromHex(hexLower)));
97 BOOST_CHECK_EQUAL(comp.type(), type);
Junxiao Shicf4ac5b2018-03-28 22:46:06 +000098 BOOST_CHECK_EQUAL(comp.toUri(), uriPrefix + hexLower);
99 BOOST_CHECK_EQUAL(Component::fromEscapedString(uriPrefix + hexLower), comp);
100 BOOST_CHECK_EQUAL(Component::fromEscapedString(uriPrefix + hexUpper), comp);
Junxiao Shi4053bd52018-08-16 13:39:25 -0600101 BOOST_CHECK_EQUAL(Component::fromEscapedString(to_string(type) + "=" + hexPct), comp);
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000102
Junxiao Shi4053bd52018-08-16 13:39:25 -0600103 BOOST_CHECK_THROW(comp.wireDecode(Block(type, fromHex("A791806951F25C4D"))), Component::Error);
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000104 BOOST_CHECK_THROW(Component::fromEscapedString(uriPrefix), Component::Error);
Junxiao Shi4053bd52018-08-16 13:39:25 -0600105 BOOST_CHECK_THROW(Component::fromEscapedString(uriPrefix + "a791806951f25c4d"),
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000106 Component::Error);
Junxiao Shi4053bd52018-08-16 13:39:25 -0600107 BOOST_CHECK_THROW(Component::fromEscapedString(boost::to_upper_copy(uriPrefix) + hexLower),
108 Component::Error);
109}
110
111BOOST_AUTO_TEST_CASE(Digest)
112{
113 testSha256(tlv::ImplicitSha256DigestComponent, "sha256digest=");
114}
115
116BOOST_AUTO_TEST_CASE(Params)
117{
118 testSha256(tlv::ParametersSha256DigestComponent, "params-sha256=");
Junxiao Shidf4b24e2016-07-14 21:41:43 +0000119}
120
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000121BOOST_AUTO_TEST_CASE(OtherType)
Junxiao Shidf4b24e2016-07-14 21:41:43 +0000122{
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000123 Component comp("0907 6E646E2D637878"_block);
124 BOOST_CHECK_EQUAL(comp.type(), 0x09);
125 BOOST_CHECK_EQUAL(comp.toUri(), "9=ndn-cxx");
126 BOOST_CHECK_EQUAL(Component::fromEscapedString("9=ndn-cxx"), comp);
127
128 comp.wireDecode("FDFFFF00"_block);
129 BOOST_CHECK_EQUAL(comp.type(), 0xFFFF);
130 BOOST_CHECK_EQUAL(comp.toUri(), "65535=...");
131 BOOST_CHECK_EQUAL(Component::fromEscapedString("65535=..."), comp);
132
133 comp.wireDecode("FD576501 2E"_block);
134 BOOST_CHECK_EQUAL(comp.type(), 0x5765);
135 BOOST_CHECK_EQUAL(comp.toUri(), "22373=....");
136 BOOST_CHECK_EQUAL(Component::fromEscapedString("22373=...."), comp);
137
138 BOOST_CHECK_THROW(Component::fromEscapedString("3="), Component::Error);
139 BOOST_CHECK_THROW(Component::fromEscapedString("3=."), Component::Error);
140 BOOST_CHECK_THROW(Component::fromEscapedString("3=.."), Component::Error);
141}
142
143BOOST_AUTO_TEST_CASE(InvalidType)
144{
145 Component comp;
146 BOOST_CHECK_THROW(comp.wireDecode("0001 80"_block), Component::Error);
147 BOOST_CHECK_THROW(comp.wireDecode("FE0001000001 80"_block), Component::Error);
148
149 BOOST_CHECK_THROW(Component::fromEscapedString("0=A"), Component::Error);
150 BOOST_CHECK_THROW(Component::fromEscapedString("65536=A"), Component::Error);
Junxiao Shid2e60632018-08-10 10:48:44 -0600151 BOOST_CHECK_THROW(Component::fromEscapedString("4294967296=A"), Component::Error);
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000152 BOOST_CHECK_THROW(Component::fromEscapedString("-1=A"), Component::Error);
153 BOOST_CHECK_THROW(Component::fromEscapedString("+=A"), Component::Error);
154 BOOST_CHECK_THROW(Component::fromEscapedString("=A"), Component::Error);
155 BOOST_CHECK_THROW(Component::fromEscapedString("0x1=A"), Component::Error);
156 BOOST_CHECK_THROW(Component::fromEscapedString("Z=A"), Component::Error);
157 BOOST_CHECK_THROW(Component::fromEscapedString("09=A"), Component::Error);
Junxiao Shi4053bd52018-08-16 13:39:25 -0600158 BOOST_CHECK_THROW(Component::fromEscapedString("0x3=A"), Component::Error);
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000159 BOOST_CHECK_THROW(Component::fromEscapedString("+9=A"), Component::Error);
Junxiao Shid2e60632018-08-10 10:48:44 -0600160 BOOST_CHECK_THROW(Component::fromEscapedString(" 9=A"), Component::Error);
161 BOOST_CHECK_THROW(Component::fromEscapedString("9 =A"), Component::Error);
162 BOOST_CHECK_THROW(Component::fromEscapedString("9.0=A"), Component::Error);
163 BOOST_CHECK_THROW(Component::fromEscapedString("9E0=A"), Component::Error);
Junxiao Shidf4b24e2016-07-14 21:41:43 +0000164}
165
166BOOST_AUTO_TEST_SUITE_END() // Decode
167
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000168BOOST_AUTO_TEST_CASE(Compare)
Junxiao Shidf4b24e2016-07-14 21:41:43 +0000169{
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000170 std::vector<Component> comps = {
171 Component("0120 0000000000000000000000000000000000000000000000000000000000000000"_block),
172 Component("0120 0000000000000000000000000000000000000000000000000000000000000001"_block),
173 Component("0120 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"_block),
Junxiao Shi4053bd52018-08-16 13:39:25 -0600174 Component("0220 0000000000000000000000000000000000000000000000000000000000000000"_block),
175 Component("0220 0000000000000000000000000000000000000000000000000000000000000001"_block),
176 Component("0220 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"_block),
177 Component(0x03),
178 Component("0301 44"_block),
179 Component("0301 46"_block),
180 Component("0302 4141"_block),
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000181 Component(),
182 Component("D"),
183 Component("F"),
184 Component("AA"),
185 Component(0x53B2),
186 Component("FD53B201 44"_block),
187 Component("FD53B201 46"_block),
188 Component("FD53B202 4141"_block),
189 };
Junxiao Shidf4b24e2016-07-14 21:41:43 +0000190
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000191 for (size_t i = 0; i < comps.size(); ++i) {
192 for (size_t j = 0; j < comps.size(); ++j) {
193 Component lhs = comps[i];
194 Component rhs = comps[j];
195 BOOST_CHECK_EQUAL(lhs == rhs, i == j);
196 BOOST_CHECK_EQUAL(lhs != rhs, i != j);
197 BOOST_CHECK_EQUAL(lhs < rhs, i < j);
198 BOOST_CHECK_EQUAL(lhs <= rhs, i <= j);
199 BOOST_CHECK_EQUAL(lhs > rhs, i > j);
200 BOOST_CHECK_EQUAL(lhs >= rhs, i >= j);
201 }
202 }
Davide Pesavento08378cb2018-02-01 16:10:54 -0500203}
204
Junxiao Shidf4b24e2016-07-14 21:41:43 +0000205BOOST_AUTO_TEST_SUITE(CreateFromIterators) // Bug 2490
206
207typedef boost::mpl::vector<
208 std::vector<uint8_t>,
209 std::list<uint8_t>,
210 std::vector<int8_t>,
211 std::list<int8_t>
212> ContainerTypes;
213
214BOOST_AUTO_TEST_CASE_TEMPLATE(ZeroOctet, T, ContainerTypes)
215{
216 T bytes;
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000217 Component c(bytes.begin(), bytes.end());
218 BOOST_CHECK_EQUAL(c.type(), tlv::GenericNameComponent);
Junxiao Shidf4b24e2016-07-14 21:41:43 +0000219 BOOST_CHECK_EQUAL(c.value_size(), 0);
220 BOOST_CHECK_EQUAL(c.size(), 2);
221}
222
223BOOST_AUTO_TEST_CASE_TEMPLATE(OneOctet, T, ContainerTypes)
224{
225 T bytes{1};
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000226 Component c(0x09, bytes.begin(), bytes.end());
227 BOOST_CHECK_EQUAL(c.type(), 0x09);
Junxiao Shidf4b24e2016-07-14 21:41:43 +0000228 BOOST_CHECK_EQUAL(c.value_size(), 1);
229 BOOST_CHECK_EQUAL(c.size(), 3);
230}
231
232BOOST_AUTO_TEST_CASE_TEMPLATE(FourOctets, T, ContainerTypes)
233{
234 T bytes{1, 2, 3, 4};
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000235 Component c(0xFCEC, bytes.begin(), bytes.end());
236 BOOST_CHECK_EQUAL(c.type(), 0xFCEC);
Junxiao Shidf4b24e2016-07-14 21:41:43 +0000237 BOOST_CHECK_EQUAL(c.value_size(), 4);
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000238 BOOST_CHECK_EQUAL(c.size(), 8);
Junxiao Shidf4b24e2016-07-14 21:41:43 +0000239}
240
241BOOST_AUTO_TEST_SUITE_END() // CreateFromIterators
242
Junxiao Shi71ff2312017-07-12 13:32:50 +0000243BOOST_AUTO_TEST_SUITE(NamingConvention)
244
245template<typename ArgType>
246struct ConventionTest
247{
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000248 function<Component(ArgType)> makeComponent;
249 function<ArgType(const Component&)> getValue;
Junxiao Shi71ff2312017-07-12 13:32:50 +0000250 function<Name&(Name&, ArgType)> append;
251 Name expected;
252 ArgType value;
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000253 function<bool(const Component&)> isComponent;
Junxiao Shi71ff2312017-07-12 13:32:50 +0000254};
255
256class NumberWithMarker
257{
258public:
259 ConventionTest<uint64_t>
260 operator()() const
261 {
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000262 return {bind(&Component::fromNumberWithMarker, 0xAA, _1),
263 bind(&Component::toNumberWithMarker, _1, 0xAA),
Junxiao Shi71ff2312017-07-12 13:32:50 +0000264 bind(&Name::appendNumberWithMarker, _1, 0xAA, _2),
265 Name("/%AA%03%E8"),
266 1000,
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000267 bind(&Component::isNumberWithMarker, _1, 0xAA)};
Junxiao Shi71ff2312017-07-12 13:32:50 +0000268 }
269};
270
271class Segment
272{
273public:
274 ConventionTest<uint64_t>
275 operator()() const
276 {
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000277 return {&Component::fromSegment,
278 bind(&Component::toSegment, _1),
Junxiao Shi71ff2312017-07-12 13:32:50 +0000279 bind(&Name::appendSegment, _1, _2),
280 Name("/%00%27%10"),
281 10000,
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000282 bind(&Component::isSegment, _1)};
Junxiao Shi71ff2312017-07-12 13:32:50 +0000283 }
284};
285
286class SegmentOffset
287{
288public:
289 ConventionTest<uint64_t>
290 operator()() const
291 {
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000292 return {&Component::fromSegmentOffset,
293 bind(&Component::toSegmentOffset, _1),
Junxiao Shi71ff2312017-07-12 13:32:50 +0000294 bind(&Name::appendSegmentOffset, _1, _2),
295 Name("/%FB%00%01%86%A0"),
296 100000,
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000297 bind(&Component::isSegmentOffset, _1)};
Junxiao Shi71ff2312017-07-12 13:32:50 +0000298 }
299};
300
301class Version
302{
303public:
304 ConventionTest<uint64_t>
305 operator()() const
306 {
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000307 return {&Component::fromVersion,
308 bind(&Component::toVersion, _1),
Junxiao Shi71ff2312017-07-12 13:32:50 +0000309 [] (Name& name, uint64_t version) -> Name& { return name.appendVersion(version); },
310 Name("/%FD%00%0FB%40"),
311 1000000,
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000312 bind(&Component::isVersion, _1)};
Junxiao Shi71ff2312017-07-12 13:32:50 +0000313 }
314};
315
316class Timestamp
317{
318public:
319 ConventionTest<time::system_clock::TimePoint>
320 operator()() const
321 {
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000322 return {&Component::fromTimestamp,
323 bind(&Component::toTimestamp, _1),
Junxiao Shi71ff2312017-07-12 13:32:50 +0000324 [] (Name& name, time::system_clock::TimePoint t) -> Name& { return name.appendTimestamp(t); },
325 Name("/%FC%00%04%7BE%E3%1B%00%00"),
Davide Pesavento0f830802018-01-16 23:58:58 -0500326 time::getUnixEpoch() + 14600_days, // 40 years
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000327 bind(&Component::isTimestamp, _1)};
Junxiao Shi71ff2312017-07-12 13:32:50 +0000328 }
329};
330
331class SequenceNumber
332{
333public:
334 ConventionTest<uint64_t>
335 operator()() const
336 {
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000337 return {&Component::fromSequenceNumber,
338 bind(&Component::toSequenceNumber, _1),
Junxiao Shi71ff2312017-07-12 13:32:50 +0000339 bind(&Name::appendSequenceNumber, _1, _2),
340 Name("/%FE%00%98%96%80"),
341 10000000,
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000342 bind(&Component::isSequenceNumber, _1)};
Junxiao Shi71ff2312017-07-12 13:32:50 +0000343 }
344};
345
346using ConventionTests = boost::mpl::vector<
347 NumberWithMarker,
348 Segment,
349 SegmentOffset,
350 Version,
351 Timestamp,
352 SequenceNumber
353>;
354
355BOOST_AUTO_TEST_CASE_TEMPLATE(Convention, T, ConventionTests)
356{
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000357 Component invalidComponent1;
358 Component invalidComponent2("1234567890");
Junxiao Shi71ff2312017-07-12 13:32:50 +0000359
360 auto test = T()();
361
362 const Name& expected = test.expected;
363 BOOST_TEST_MESSAGE("Check " << expected[0].toUri());
364
365 BOOST_CHECK_EQUAL(expected[0].isGeneric(), true);
366
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000367 Component actualComponent = test.makeComponent(test.value);
Junxiao Shi71ff2312017-07-12 13:32:50 +0000368 BOOST_CHECK_EQUAL(actualComponent, expected[0]);
369
370 Name actualName;
371 test.append(actualName, test.value);
372 BOOST_CHECK_EQUAL(actualName, expected);
373
374 BOOST_CHECK_EQUAL(test.isComponent(expected[0]), true);
375 BOOST_CHECK_EQUAL(test.getValue(expected[0]), test.value);
376
377 BOOST_CHECK_EQUAL(test.isComponent(invalidComponent1), false);
378 BOOST_CHECK_EQUAL(test.isComponent(invalidComponent2), false);
379
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000380 BOOST_CHECK_THROW(test.getValue(invalidComponent1), Component::Error);
381 BOOST_CHECK_THROW(test.getValue(invalidComponent2), Component::Error);
Junxiao Shi71ff2312017-07-12 13:32:50 +0000382}
383
384BOOST_AUTO_TEST_SUITE_END() // NamingConvention
385
Junxiao Shidf4b24e2016-07-14 21:41:43 +0000386BOOST_AUTO_TEST_SUITE_END() // TestNameComponent
387
388} // namespace tests
Junxiao Shicf4ac5b2018-03-28 22:46:06 +0000389} // namespace name
Junxiao Shidf4b24e2016-07-14 21:41:43 +0000390} // namespace ndn