Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
Alexander Afanasyev | c0e2658 | 2017-08-13 21:16:49 -0400 | [diff] [blame] | 2 | /* |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 3 | * Copyright (c) 2014-2017, Regents of the University of California. |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 4 | * |
| 5 | * This file is part of NDN repo-ng (Next generation of NDN repository). |
| 6 | * See AUTHORS.md for complete list of repo-ng authors and contributors. |
| 7 | * |
| 8 | * repo-ng 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 | * repo-ng 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 | * repo-ng, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 18 | */ |
| 19 | |
| 20 | #include "storage/index.hpp" |
| 21 | |
| 22 | #include "../sqlite-fixture.hpp" |
| 23 | #include "../dataset-fixtures.hpp" |
| 24 | |
Alexander Afanasyev | c0e2658 | 2017-08-13 21:16:49 -0400 | [diff] [blame] | 25 | #include <iostream> |
| 26 | |
| 27 | #include <ndn-cxx/security/signing-helpers.hpp> |
| 28 | #include <ndn-cxx/util/sha256.hpp> |
| 29 | #include <ndn-cxx/util/random.hpp> |
| 30 | |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 31 | #include <boost/mpl/push_back.hpp> |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 32 | #include <boost/test/unit_test.hpp> |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 33 | |
| 34 | namespace repo { |
| 35 | namespace tests { |
| 36 | |
Alexander Afanasyev | b7e8a81 | 2014-07-23 01:36:47 -0700 | [diff] [blame] | 37 | BOOST_AUTO_TEST_SUITE(Index) |
Weiqi Shi | f0330d5 | 2014-07-09 10:54:27 -0700 | [diff] [blame] | 38 | |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 39 | class FindFixture |
| 40 | { |
| 41 | protected: |
| 42 | FindFixture() |
| 43 | : m_index(std::numeric_limits<size_t>::max()) |
| 44 | { |
| 45 | } |
| 46 | |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 47 | Name |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 48 | insert(int id, const Name& name) |
| 49 | { |
| 50 | shared_ptr<Data> data = make_shared<Data>(name); |
| 51 | data->setContent(reinterpret_cast<const uint8_t*>(&id), sizeof(id)); |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 52 | m_keyChain.sign(*data, ndn::signingWithSha256()); |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 53 | data->wireEncode(); |
| 54 | m_index.insert(*data, id); |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 55 | |
| 56 | return data->getFullName(); |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | Interest& |
| 60 | startInterest(const Name& name) |
| 61 | { |
| 62 | m_interest = make_shared<Interest>(name); |
| 63 | return *m_interest; |
| 64 | } |
| 65 | |
Alexander Afanasyev | d352cce | 2015-11-20 14:15:11 -0500 | [diff] [blame] | 66 | int |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 67 | find() |
| 68 | { |
Alexander Afanasyev | d352cce | 2015-11-20 14:15:11 -0500 | [diff] [blame] | 69 | std::pair<int, Name> found = m_index.find(*m_interest); |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 70 | return found.first; |
| 71 | } |
| 72 | |
| 73 | protected: |
Alexander Afanasyev | b7e8a81 | 2014-07-23 01:36:47 -0700 | [diff] [blame] | 74 | repo::Index m_index; |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 75 | KeyChain m_keyChain; |
| 76 | shared_ptr<Interest> m_interest; |
| 77 | }; |
| 78 | |
| 79 | BOOST_FIXTURE_TEST_SUITE(Find, FindFixture) |
| 80 | |
| 81 | BOOST_AUTO_TEST_CASE(EmptyDataName) |
| 82 | { |
| 83 | insert(1, "ndn:/"); |
| 84 | startInterest("ndn:/"); |
| 85 | BOOST_CHECK_EQUAL(find(), 1); |
| 86 | } |
| 87 | |
| 88 | BOOST_AUTO_TEST_CASE(EmptyInterestName) |
| 89 | { |
| 90 | insert(1, "ndn:/A"); |
| 91 | startInterest("ndn:/"); |
| 92 | BOOST_CHECK_EQUAL(find(), 1); |
| 93 | } |
| 94 | |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 95 | BOOST_AUTO_TEST_CASE(ExactName) |
| 96 | { |
| 97 | insert(1, "ndn:/"); |
| 98 | insert(2, "ndn:/A"); |
| 99 | insert(3, "ndn:/A/B"); |
| 100 | insert(4, "ndn:/A/C"); |
| 101 | insert(5, "ndn:/D"); |
| 102 | |
| 103 | startInterest("ndn:/A"); |
| 104 | BOOST_CHECK_EQUAL(find(), 2); |
| 105 | } |
| 106 | |
| 107 | BOOST_AUTO_TEST_CASE(FullName) |
| 108 | { |
| 109 | Name n1 = insert(1, "ndn:/A"); |
| 110 | Name n2 = insert(2, "ndn:/A"); |
| 111 | |
| 112 | startInterest(n1); |
| 113 | BOOST_CHECK_EQUAL(find(), 1); |
| 114 | |
| 115 | startInterest(n2); |
| 116 | BOOST_CHECK_EQUAL(find(), 2); |
| 117 | } |
| 118 | |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 119 | BOOST_AUTO_TEST_CASE(Leftmost) |
| 120 | { |
| 121 | insert(1, "ndn:/A"); |
| 122 | insert(2, "ndn:/B/p/1"); |
| 123 | insert(3, "ndn:/B/p/2"); |
| 124 | insert(4, "ndn:/B/q/1"); |
| 125 | insert(5, "ndn:/B/q/2"); |
| 126 | insert(6, "ndn:/C"); |
| 127 | |
| 128 | startInterest("ndn:/B"); |
| 129 | BOOST_CHECK_EQUAL(find(), 2); |
| 130 | } |
| 131 | |
| 132 | BOOST_AUTO_TEST_CASE(Rightmost) |
| 133 | { |
| 134 | insert(1, "ndn:/A"); |
| 135 | insert(2, "ndn:/B/p/1"); |
| 136 | insert(3, "ndn:/B/p/2"); |
| 137 | insert(4, "ndn:/B/q/1"); |
| 138 | insert(5, "ndn:/B/q/2"); |
| 139 | insert(6, "ndn:/C"); |
| 140 | |
| 141 | startInterest("ndn:/B") |
| 142 | .setChildSelector(1); |
| 143 | BOOST_CHECK_EQUAL(find(), 4); |
| 144 | } |
| 145 | |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 146 | BOOST_AUTO_TEST_CASE(MinSuffixComponents) |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 147 | { |
| 148 | insert(1, "ndn:/"); |
| 149 | insert(2, "ndn:/A"); |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 150 | insert(3, "ndn:/B/1"); |
| 151 | insert(4, "ndn:/C/1/2"); |
| 152 | insert(5, "ndn:/D/1/2/3"); |
| 153 | insert(6, "ndn:/E/1/2/3/4"); |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 154 | |
| 155 | startInterest("ndn:/") |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 156 | .setMinSuffixComponents(0); |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 157 | BOOST_CHECK_EQUAL(find(), 1); |
| 158 | |
| 159 | startInterest("ndn:/") |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 160 | .setMinSuffixComponents(1); |
| 161 | BOOST_CHECK_EQUAL(find(), 1); |
| 162 | |
| 163 | startInterest("ndn:/") |
| 164 | .setMinSuffixComponents(2); |
| 165 | BOOST_CHECK_EQUAL(find(), 2); |
| 166 | |
| 167 | startInterest("ndn:/") |
| 168 | .setMinSuffixComponents(3); |
| 169 | BOOST_CHECK_EQUAL(find(), 3); |
| 170 | |
| 171 | startInterest("ndn:/") |
| 172 | .setMinSuffixComponents(4); |
| 173 | BOOST_CHECK_EQUAL(find(), 4); |
| 174 | |
| 175 | startInterest("ndn:/") |
| 176 | .setMinSuffixComponents(5); |
| 177 | BOOST_CHECK_EQUAL(find(), 5); |
| 178 | |
| 179 | startInterest("ndn:/") |
| 180 | .setMinSuffixComponents(6); |
| 181 | BOOST_CHECK_EQUAL(find(), 6); |
| 182 | |
| 183 | startInterest("ndn:/") |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 184 | .setMinSuffixComponents(7); |
| 185 | BOOST_CHECK_EQUAL(find(), 0); |
| 186 | } |
| 187 | |
| 188 | BOOST_AUTO_TEST_CASE(MaxSuffixComponents) |
| 189 | { |
| 190 | insert(1, "ndn:/"); |
| 191 | insert(2, "ndn:/A"); |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 192 | insert(3, "ndn:/B/2"); |
| 193 | insert(4, "ndn:/C/2/3"); |
| 194 | insert(5, "ndn:/D/2/3/4"); |
| 195 | insert(6, "ndn:/E/2/3/4/5"); |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 196 | |
| 197 | startInterest("ndn:/") |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 198 | .setChildSelector(1) |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 199 | .setMaxSuffixComponents(0); |
| 200 | BOOST_CHECK_EQUAL(find(), 0); |
| 201 | |
| 202 | startInterest("ndn:/") |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 203 | .setChildSelector(1) |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 204 | .setMaxSuffixComponents(1); |
| 205 | BOOST_CHECK_EQUAL(find(), 1); |
| 206 | |
| 207 | startInterest("ndn:/") |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 208 | .setChildSelector(1) |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 209 | .setMaxSuffixComponents(2); |
| 210 | BOOST_CHECK_EQUAL(find(), 2); |
| 211 | |
| 212 | startInterest("ndn:/") |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 213 | .setChildSelector(1) |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 214 | .setMaxSuffixComponents(3); |
| 215 | BOOST_CHECK_EQUAL(find(), 3); |
| 216 | |
| 217 | startInterest("ndn:/") |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 218 | .setChildSelector(1) |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 219 | .setMaxSuffixComponents(4); |
| 220 | BOOST_CHECK_EQUAL(find(), 4); |
| 221 | |
| 222 | startInterest("ndn:/") |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 223 | .setChildSelector(1) |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 224 | .setMaxSuffixComponents(5); |
| 225 | BOOST_CHECK_EQUAL(find(), 5); |
| 226 | |
| 227 | startInterest("ndn:/") |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 228 | .setChildSelector(1) |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 229 | .setMaxSuffixComponents(6); |
| 230 | BOOST_CHECK_EQUAL(find(), 6); |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 231 | |
| 232 | startInterest("ndn:/") |
| 233 | .setChildSelector(1) |
| 234 | .setMaxSuffixComponents(7); |
| 235 | BOOST_CHECK_EQUAL(find(), 6); |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 236 | } |
| 237 | |
| 238 | BOOST_AUTO_TEST_CASE(DigestOrder) |
| 239 | { |
| 240 | insert(1, "ndn:/A"); |
| 241 | insert(2, "ndn:/A"); |
| 242 | // We don't know which comes first, but there must be some order |
| 243 | |
| 244 | startInterest("ndn:/A") |
| 245 | .setChildSelector(0); |
| 246 | uint32_t leftmost = find(); |
| 247 | |
| 248 | startInterest("ndn:/A") |
| 249 | .setChildSelector(1); |
| 250 | uint32_t rightmost = find(); |
| 251 | |
| 252 | BOOST_CHECK_NE(leftmost, rightmost); |
| 253 | } |
| 254 | |
| 255 | BOOST_AUTO_TEST_CASE(DigestExclude) |
| 256 | { |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 257 | insert(1, "ndn:/A"); |
| 258 | Name n2 = insert(2, "ndn:/A"); |
| 259 | insert(3, "ndn:/A/B"); |
| 260 | |
Alexander Afanasyev | c0e2658 | 2017-08-13 21:16:49 -0400 | [diff] [blame] | 261 | uint8_t digest00[ndn::util::Sha256::DIGEST_SIZE]; |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 262 | std::fill_n(digest00, sizeof(digest00), 0x00); |
Alexander Afanasyev | c0e2658 | 2017-08-13 21:16:49 -0400 | [diff] [blame] | 263 | uint8_t digestFF[ndn::util::Sha256::DIGEST_SIZE]; |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 264 | std::fill_n(digestFF, sizeof(digestFF), 0xFF); |
| 265 | |
| 266 | Exclude excludeDigest; |
| 267 | excludeDigest.excludeRange( |
| 268 | name::Component::fromImplicitSha256Digest(digest00, sizeof(digest00)), |
| 269 | name::Component::fromImplicitSha256Digest(digestFF, sizeof(digestFF))); |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 270 | |
| 271 | startInterest("ndn:/A") |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 272 | .setChildSelector(0) |
| 273 | .setExclude(excludeDigest); |
| 274 | BOOST_CHECK_EQUAL(find(), 3); |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 275 | |
| 276 | startInterest("ndn:/A") |
| 277 | .setChildSelector(1) |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 278 | .setExclude(excludeDigest); |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 279 | BOOST_CHECK_EQUAL(find(), 3); |
| 280 | |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 281 | Exclude excludeGeneric; |
| 282 | excludeGeneric.excludeAfter(name::Component(static_cast<uint8_t*>(nullptr), 0)); |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 283 | |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 284 | startInterest("ndn:/A") |
| 285 | .setChildSelector(0) |
| 286 | .setExclude(excludeGeneric); |
| 287 | int found1 = find(); |
| 288 | BOOST_CHECK(found1 == 1 || found1 == 2); |
| 289 | |
| 290 | startInterest("ndn:/A") |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 291 | .setChildSelector(1) |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 292 | .setExclude(excludeGeneric); |
| 293 | int found2 = find(); |
| 294 | BOOST_CHECK(found2 == 1 || found2 == 2); |
| 295 | |
| 296 | Exclude exclude2 = excludeGeneric; |
| 297 | exclude2.excludeOne(n2.get(-1)); |
| 298 | |
| 299 | startInterest("ndn:/A") |
| 300 | .setChildSelector(0) |
| 301 | .setExclude(exclude2); |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 302 | BOOST_CHECK_EQUAL(find(), 1); |
| 303 | |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 304 | startInterest("ndn:/A") |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 305 | .setChildSelector(1) |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 306 | .setExclude(exclude2); |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 307 | BOOST_CHECK_EQUAL(find(), 1); |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 308 | } |
| 309 | |
| 310 | BOOST_AUTO_TEST_SUITE_END() // Find |
| 311 | |
Alexander Afanasyev | b7e8a81 | 2014-07-23 01:36:47 -0700 | [diff] [blame] | 312 | |
| 313 | template<class Dataset> |
| 314 | class Fixture : public Dataset |
| 315 | { |
| 316 | public: |
| 317 | Fixture() |
| 318 | : index(65535) |
| 319 | { |
| 320 | } |
| 321 | |
| 322 | public: |
| 323 | std::map<int64_t, shared_ptr<Data> > idToDataMap; |
| 324 | repo::Index index; |
| 325 | }; |
| 326 | |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 327 | // Combine CommonDatasets with ComplexSelectorDataset |
| 328 | typedef boost::mpl::push_back<CommonDatasets, |
| 329 | ComplexSelectorsDataset>::type Datasets; |
Alexander Afanasyev | b7e8a81 | 2014-07-23 01:36:47 -0700 | [diff] [blame] | 330 | |
Alexander Afanasyev | 595b2bd | 2014-12-14 12:55:36 -0800 | [diff] [blame] | 331 | BOOST_FIXTURE_TEST_CASE_TEMPLATE(Bulk, T, Datasets, Fixture<T>) |
Alexander Afanasyev | b7e8a81 | 2014-07-23 01:36:47 -0700 | [diff] [blame] | 332 | { |
| 333 | BOOST_TEST_MESSAGE(T::getName()); |
| 334 | |
| 335 | for (typename T::DataContainer::iterator i = this->data.begin(); |
| 336 | i != this->data.end(); ++i) |
| 337 | { |
| 338 | int64_t id = std::abs(static_cast<int64_t>(ndn::random::generateWord64())); |
| 339 | this->idToDataMap.insert(std::make_pair(id, *i)); |
| 340 | |
| 341 | BOOST_CHECK_EQUAL(this->index.insert(**i, id), true); |
| 342 | } |
| 343 | |
| 344 | BOOST_CHECK_EQUAL(this->index.size(), this->data.size()); |
| 345 | |
| 346 | for (typename T::InterestContainer::iterator i = this->interests.begin(); |
| 347 | i != this->interests.end(); ++i) |
| 348 | { |
| 349 | std::pair<int64_t, Name> item = this->index.find(i->first); |
| 350 | |
| 351 | BOOST_REQUIRE_GT(item.first, 0); |
| 352 | BOOST_REQUIRE(this->idToDataMap.count(item.first) > 0); |
| 353 | |
| 354 | BOOST_TEST_MESSAGE(i->first); |
| 355 | BOOST_CHECK_EQUAL(*this->idToDataMap[item.first], *i->second); |
| 356 | |
| 357 | BOOST_CHECK_EQUAL(this->index.hasData(*i->second), true); |
| 358 | } |
| 359 | |
| 360 | // Need support for selector-based removal |
| 361 | // for (typename T::RemovalsContainer::iterator i = this->removals.begin(); |
| 362 | // i != this->removals.end(); ++i) |
| 363 | // { |
| 364 | // size_t nRemoved = 0; |
| 365 | // BOOST_REQUIRE_NO_THROW(this->index.erase(*i)); |
| 366 | // BOOST_CHECK_EQUAL(nRemoved, i->seconds); |
| 367 | // } |
| 368 | } |
| 369 | |
Weiqi Shi | 28a90fb | 2014-07-09 10:28:55 -0700 | [diff] [blame] | 370 | BOOST_AUTO_TEST_SUITE_END() |
| 371 | |
| 372 | } // namespace tests |
| 373 | } // namespace repo |