Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 2 | /* |
Junxiao Shi | 9619295 | 2019-05-22 15:45:12 +0000 | [diff] [blame] | 3 | * Copyright (c) 2014-2019, Arizona Board of Regents. |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 4 | * |
| 5 | * This file is part of ndn-tools (Named Data Networking Essential Tools). |
| 6 | * See AUTHORS.md for complete list of ndn-tools authors and contributors. |
| 7 | * |
| 8 | * ndn-tools is free software: you can redistribute it and/or modify it under the terms |
| 9 | * of the GNU General Public License as published by the Free Software Foundation, |
| 10 | * either version 3 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * ndn-tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 13 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 14 | * PURPOSE. See the GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License along with |
| 17 | * ndn-tools, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 18 | */ |
| 19 | |
| 20 | #include "tools/peek/ndnpeek/ndnpeek.hpp" |
| 21 | |
| 22 | #include "tests/test-common.hpp" |
Davide Pesavento | bf28cd7 | 2017-08-13 17:22:47 -0400 | [diff] [blame] | 23 | |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 24 | #include <ndn-cxx/util/dummy-client-face.hpp> |
| 25 | |
| 26 | #include <boost/mpl/vector.hpp> |
| 27 | |
| 28 | namespace ndn { |
| 29 | namespace peek { |
| 30 | namespace tests { |
| 31 | |
| 32 | using namespace ndn::tests; |
| 33 | using boost::test_tools::output_test_stream; |
| 34 | |
| 35 | class CoutRedirector : noncopyable |
| 36 | { |
| 37 | public: |
| 38 | explicit |
| 39 | CoutRedirector(std::ostream& destination) |
| 40 | { |
| 41 | m_originalBuf = std::cout.rdbuf(destination.rdbuf()); |
| 42 | } |
| 43 | |
| 44 | ~CoutRedirector() |
| 45 | { |
| 46 | std::cout.rdbuf(m_originalBuf); |
| 47 | } |
| 48 | |
| 49 | private: |
| 50 | std::streambuf* m_originalBuf; |
| 51 | }; |
| 52 | |
Davide Pesavento | 9602823 | 2019-08-17 01:26:13 -0400 | [diff] [blame] | 53 | static PeekOptions |
| 54 | makeDefaultOptions() |
| 55 | { |
| 56 | PeekOptions opt; |
| 57 | opt.name = "/peek/test"; |
| 58 | return opt; |
| 59 | } |
| 60 | |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 61 | class NdnPeekFixture : public UnitTestTimeFixture |
| 62 | { |
| 63 | protected: |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 64 | void |
Davide Pesavento | 9602823 | 2019-08-17 01:26:13 -0400 | [diff] [blame] | 65 | initialize(const PeekOptions& opts = makeDefaultOptions()) |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 66 | { |
| 67 | peek = make_unique<NdnPeek>(face, opts); |
| 68 | } |
| 69 | |
| 70 | protected: |
| 71 | boost::asio::io_service io; |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 72 | ndn::util::DummyClientFace face{io}; |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 73 | output_test_stream output; |
| 74 | unique_ptr<NdnPeek> peek; |
| 75 | }; |
| 76 | |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 77 | class OutputFull |
| 78 | { |
| 79 | public: |
| 80 | static PeekOptions |
| 81 | makeOptions() |
| 82 | { |
| 83 | return makeDefaultOptions(); |
| 84 | } |
| 85 | |
| 86 | static void |
| 87 | checkOutput(output_test_stream& output, const Data& data) |
| 88 | { |
| 89 | const Block& block = data.wireEncode(); |
| 90 | std::string expected(reinterpret_cast<const char*>(block.wire()), block.size()); |
| 91 | BOOST_CHECK(output.is_equal(expected)); |
| 92 | } |
| 93 | |
| 94 | static void |
| 95 | checkOutput(output_test_stream& output, const lp::Nack& nack) |
| 96 | { |
| 97 | const Block& block = nack.getHeader().wireEncode(); |
| 98 | std::string expected(reinterpret_cast<const char*>(block.wire()), block.size()); |
| 99 | BOOST_CHECK(output.is_equal(expected)); |
| 100 | } |
| 101 | }; |
| 102 | |
| 103 | class OutputPayloadOnly |
| 104 | { |
| 105 | public: |
| 106 | static PeekOptions |
| 107 | makeOptions() |
| 108 | { |
| 109 | PeekOptions opt = makeDefaultOptions(); |
| 110 | opt.wantPayloadOnly = true; |
| 111 | return opt; |
| 112 | } |
| 113 | |
| 114 | static void |
| 115 | checkOutput(output_test_stream& output, const Data& data) |
| 116 | { |
| 117 | const Block& block = data.getContent(); |
| 118 | std::string expected(reinterpret_cast<const char*>(block.value()), block.value_size()); |
| 119 | BOOST_CHECK(output.is_equal(expected)); |
| 120 | } |
| 121 | |
| 122 | static void |
| 123 | checkOutput(output_test_stream& output, const lp::Nack& nack) |
| 124 | { |
| 125 | std::string expected = boost::lexical_cast<std::string>(nack.getReason()) + '\n'; |
| 126 | BOOST_CHECK(output.is_equal(expected)); |
| 127 | } |
| 128 | }; |
| 129 | |
| 130 | BOOST_AUTO_TEST_SUITE(Peek) |
| 131 | BOOST_FIXTURE_TEST_SUITE(TestNdnPeek, NdnPeekFixture) |
| 132 | |
| 133 | using OutputChecks = boost::mpl::vector<OutputFull, OutputPayloadOnly>; |
| 134 | |
| 135 | BOOST_AUTO_TEST_CASE_TEMPLATE(Default, OutputCheck, OutputChecks) |
| 136 | { |
| 137 | auto options = OutputCheck::makeOptions(); |
| 138 | initialize(options); |
| 139 | |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 140 | auto data = makeData(options.name); |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 141 | const std::string payload = "NdnPeekTest"; |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 142 | data->setContent(reinterpret_cast<const uint8_t*>(payload.data()), payload.size()); |
| 143 | |
| 144 | { |
| 145 | CoutRedirector redir(output); |
| 146 | peek->start(); |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 147 | this->advanceClocks(io, 25_ms, 4); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 148 | face.receive(*data); |
| 149 | } |
| 150 | |
| 151 | OutputCheck::checkOutput(output, *data); |
| 152 | BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 1); |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 153 | BOOST_CHECK_EQUAL(face.sentInterests.back().getCanBePrefix(), false); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 154 | BOOST_CHECK_EQUAL(face.sentInterests.back().getMustBeFresh(), false); |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 155 | BOOST_CHECK_EQUAL(face.sentInterests.back().getForwardingHint().empty(), true); |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 156 | BOOST_CHECK_EQUAL(face.sentInterests.back().getInterestLifetime(), DEFAULT_INTEREST_LIFETIME); |
Davide Pesavento | c214e07 | 2019-08-17 01:33:28 -0400 | [diff] [blame] | 157 | BOOST_CHECK(face.sentInterests.back().getHopLimit() == nullopt); |
| 158 | BOOST_CHECK(!face.sentInterests.back().hasApplicationParameters()); |
Davide Pesavento | 87434be | 2019-07-25 19:04:23 -0400 | [diff] [blame] | 159 | BOOST_CHECK(peek->getResult() == NdnPeek::Result::DATA); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 160 | } |
| 161 | |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 162 | BOOST_AUTO_TEST_CASE_TEMPLATE(NonDefault, OutputCheck, OutputChecks) |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 163 | { |
| 164 | auto options = OutputCheck::makeOptions(); |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 165 | options.canBePrefix = true; |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 166 | options.mustBeFresh = true; |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 167 | options.interestLifetime = 200_ms; |
Davide Pesavento | c214e07 | 2019-08-17 01:33:28 -0400 | [diff] [blame] | 168 | options.hopLimit = 64; |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 169 | initialize(options); |
| 170 | |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 171 | auto data = makeData(Name(options.name).append("suffix")); |
Junxiao Shi | 9619295 | 2019-05-22 15:45:12 +0000 | [diff] [blame] | 172 | data->setFreshnessPeriod(1_s); |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 173 | const std::string payload = "NdnPeekTest"; |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 174 | data->setContent(reinterpret_cast<const uint8_t*>(payload.data()), payload.size()); |
| 175 | |
| 176 | { |
| 177 | CoutRedirector redir(output); |
| 178 | peek->start(); |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 179 | this->advanceClocks(io, 25_ms, 4); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 180 | face.receive(*data); |
| 181 | } |
| 182 | |
| 183 | OutputCheck::checkOutput(output, *data); |
| 184 | BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 1); |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 185 | BOOST_CHECK_EQUAL(face.sentInterests.back().getCanBePrefix(), true); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 186 | BOOST_CHECK_EQUAL(face.sentInterests.back().getMustBeFresh(), true); |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 187 | BOOST_CHECK_EQUAL(face.sentInterests.back().getForwardingHint().empty(), true); |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 188 | BOOST_CHECK_EQUAL(face.sentInterests.back().getInterestLifetime(), 200_ms); |
Davide Pesavento | c214e07 | 2019-08-17 01:33:28 -0400 | [diff] [blame] | 189 | BOOST_CHECK(face.sentInterests.back().getHopLimit() == 64); |
| 190 | BOOST_CHECK(!face.sentInterests.back().hasApplicationParameters()); |
Davide Pesavento | 87434be | 2019-07-25 19:04:23 -0400 | [diff] [blame] | 191 | BOOST_CHECK(peek->getResult() == NdnPeek::Result::DATA); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 192 | } |
| 193 | |
| 194 | BOOST_AUTO_TEST_CASE_TEMPLATE(ReceiveNackWithReason, OutputCheck, OutputChecks) |
| 195 | { |
| 196 | auto options = OutputCheck::makeOptions(); |
| 197 | initialize(options); |
| 198 | lp::Nack nack; |
| 199 | |
| 200 | { |
| 201 | CoutRedirector redir(output); |
| 202 | peek->start(); |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 203 | this->advanceClocks(io, 25_ms, 4); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 204 | nack = makeNack(face.sentInterests.at(0), lp::NackReason::NO_ROUTE); |
| 205 | face.receive(nack); |
| 206 | } |
| 207 | |
| 208 | OutputCheck::checkOutput(output, nack); |
| 209 | BOOST_CHECK_EQUAL(face.sentInterests.size(), 1); |
Davide Pesavento | 87434be | 2019-07-25 19:04:23 -0400 | [diff] [blame] | 210 | BOOST_CHECK(peek->getResult() == NdnPeek::Result::NACK); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 211 | } |
| 212 | |
| 213 | BOOST_AUTO_TEST_CASE_TEMPLATE(ReceiveNackWithoutReason, OutputCheck, OutputChecks) |
| 214 | { |
| 215 | auto options = OutputCheck::makeOptions(); |
| 216 | initialize(options); |
| 217 | lp::Nack nack; |
| 218 | |
| 219 | { |
| 220 | CoutRedirector redir(output); |
| 221 | peek->start(); |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 222 | this->advanceClocks(io, 25_ms, 4); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 223 | nack = makeNack(face.sentInterests.at(0), lp::NackReason::NONE); |
| 224 | face.receive(nack); |
| 225 | } |
| 226 | |
| 227 | OutputCheck::checkOutput(output, nack); |
| 228 | BOOST_CHECK_EQUAL(face.sentInterests.size(), 1); |
Davide Pesavento | 87434be | 2019-07-25 19:04:23 -0400 | [diff] [blame] | 229 | BOOST_CHECK(peek->getResult() == NdnPeek::Result::NACK); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 230 | } |
| 231 | |
Davide Pesavento | 9602823 | 2019-08-17 01:26:13 -0400 | [diff] [blame] | 232 | BOOST_AUTO_TEST_CASE(ApplicationParameters) |
| 233 | { |
| 234 | auto options = makeDefaultOptions(); |
| 235 | options.applicationParameters = make_shared<Buffer>("hello", 5); |
| 236 | initialize(options); |
| 237 | |
| 238 | peek->start(); |
| 239 | this->advanceClocks(io, 25_ms, 4); |
| 240 | |
| 241 | BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 1); |
| 242 | BOOST_CHECK_EQUAL(face.sentInterests.back().getCanBePrefix(), false); |
| 243 | BOOST_CHECK_EQUAL(face.sentInterests.back().getMustBeFresh(), false); |
| 244 | BOOST_CHECK_EQUAL(face.sentInterests.back().getForwardingHint().empty(), true); |
| 245 | BOOST_CHECK_EQUAL(face.sentInterests.back().getInterestLifetime(), DEFAULT_INTEREST_LIFETIME); |
| 246 | BOOST_CHECK_EQUAL(face.sentInterests.back().hasApplicationParameters(), true); |
| 247 | BOOST_CHECK_EQUAL(face.sentInterests.back().getApplicationParameters(), "2405 68656C6C6F"_block); |
| 248 | } |
| 249 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 250 | BOOST_AUTO_TEST_CASE(NoTimeout) |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 251 | { |
| 252 | auto options = makeDefaultOptions(); |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 253 | options.interestLifetime = 1_s; |
| 254 | options.timeout = nullopt; |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 255 | initialize(options); |
| 256 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 257 | BOOST_CHECK_EQUAL(face.sentInterests.size(), 0); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 258 | |
| 259 | peek->start(); |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 260 | this->advanceClocks(io, 100_ms, 9); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 261 | BOOST_CHECK_EQUAL(face.sentInterests.size(), 1); |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 262 | BOOST_CHECK_EQUAL(face.getNPendingInterests(), 1); |
Davide Pesavento | 87434be | 2019-07-25 19:04:23 -0400 | [diff] [blame] | 263 | BOOST_CHECK(peek->getResult() == NdnPeek::Result::UNKNOWN); |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 264 | |
| 265 | this->advanceClocks(io, 100_ms, 2); |
| 266 | BOOST_CHECK_EQUAL(face.sentInterests.size(), 1); |
| 267 | BOOST_CHECK_EQUAL(face.getNPendingInterests(), 0); |
Davide Pesavento | 87434be | 2019-07-25 19:04:23 -0400 | [diff] [blame] | 268 | BOOST_CHECK(peek->getResult() == NdnPeek::Result::TIMEOUT); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 269 | } |
| 270 | |
| 271 | BOOST_AUTO_TEST_CASE(TimeoutLessThanLifetime) |
| 272 | { |
| 273 | auto options = makeDefaultOptions(); |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 274 | options.interestLifetime = 200_ms; |
| 275 | options.timeout = 100_ms; |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 276 | initialize(options); |
| 277 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 278 | BOOST_CHECK_EQUAL(face.sentInterests.size(), 0); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 279 | |
| 280 | peek->start(); |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 281 | this->advanceClocks(io, 25_ms, 6); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 282 | |
| 283 | BOOST_CHECK_EQUAL(face.sentInterests.size(), 1); |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 284 | BOOST_CHECK_EQUAL(face.getNPendingInterests(), 0); |
Davide Pesavento | 87434be | 2019-07-25 19:04:23 -0400 | [diff] [blame] | 285 | BOOST_CHECK(peek->getResult() == NdnPeek::Result::TIMEOUT); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 286 | } |
| 287 | |
| 288 | BOOST_AUTO_TEST_CASE(TimeoutGreaterThanLifetime) |
| 289 | { |
| 290 | auto options = makeDefaultOptions(); |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 291 | options.interestLifetime = 50_ms; |
| 292 | options.timeout = 200_ms; |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 293 | initialize(options); |
| 294 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 295 | BOOST_CHECK_EQUAL(face.sentInterests.size(), 0); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 296 | |
| 297 | peek->start(); |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 298 | this->advanceClocks(io, 25_ms, 4); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 299 | |
| 300 | BOOST_CHECK_EQUAL(face.sentInterests.size(), 1); |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 301 | BOOST_CHECK_EQUAL(face.getNPendingInterests(), 0); |
Davide Pesavento | 87434be | 2019-07-25 19:04:23 -0400 | [diff] [blame] | 302 | BOOST_CHECK(peek->getResult() == NdnPeek::Result::TIMEOUT); |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 303 | } |
| 304 | |
Davide Pesavento | 9602823 | 2019-08-17 01:26:13 -0400 | [diff] [blame] | 305 | BOOST_AUTO_TEST_CASE(OversizedPacket) |
| 306 | { |
| 307 | auto options = makeDefaultOptions(); |
| 308 | options.applicationParameters = make_shared<Buffer>(MAX_NDN_PACKET_SIZE); |
| 309 | initialize(options); |
| 310 | |
| 311 | peek->start(); |
| 312 | BOOST_CHECK_THROW(this->advanceClocks(io, 1_ms, 10), Face::OversizedPacketError); |
| 313 | |
| 314 | BOOST_CHECK_EQUAL(face.sentInterests.size(), 0); |
| 315 | } |
| 316 | |
Zhuo Li | b355889 | 2016-08-12 15:51:12 -0700 | [diff] [blame] | 317 | BOOST_AUTO_TEST_SUITE_END() // TestNdnPeek |
| 318 | BOOST_AUTO_TEST_SUITE_END() // Peek |
| 319 | |
| 320 | } // namespace tests |
| 321 | } // namespace peek |
| 322 | } // namespace ndn |