This repository was archived by the owner on Mar 28, 2020. It is now read-only.
File tree 2 files changed +2
-62
lines changed
2 files changed +2
-62
lines changed Original file line number Diff line number Diff line change @@ -336,24 +336,15 @@ class OverlayFileSystem : public FileSystem {
336
336
337
337
using iterator = FileSystemList::reverse_iterator;
338
338
using const_iterator = FileSystemList::const_reverse_iterator;
339
- using reverse_iterator = FileSystemList::iterator;
340
- using const_reverse_iterator = FileSystemList::const_iterator;
341
339
342
340
// / Get an iterator pointing to the most recently added file system.
343
341
iterator overlays_begin () { return FSList.rbegin (); }
344
342
const_iterator overlays_begin () const { return FSList.rbegin (); }
345
343
346
- // / Get an iterator pointing one-past the least recently added file system.
344
+ // / Get an iterator pointing one-past the least recently added file
345
+ // / system.
347
346
iterator overlays_end () { return FSList.rend (); }
348
347
const_iterator overlays_end () const { return FSList.rend (); }
349
-
350
- // / Get an iterator pointing to the least recently added file system.
351
- reverse_iterator overlays_rbegin () { return FSList.begin (); }
352
- const_reverse_iterator overlays_rbegin () const { return FSList.begin (); }
353
-
354
- // / Get an iterator pointing one-past the most recently added file system.
355
- reverse_iterator overlays_rend () { return FSList.end (); }
356
- const_reverse_iterator overlays_rend () const { return FSList.end (); }
357
348
};
358
349
359
350
// / By default, this delegates all calls to the underlying file system. This
Original file line number Diff line number Diff line change @@ -343,57 +343,6 @@ TEST(VirtualFileSystemTest, MergedDirPermissions) {
343
343
EXPECT_EQ (0200 , Status->getPermissions ());
344
344
}
345
345
346
- TEST (VirtualFileSystemTest, OverlayIterator) {
347
- IntrusiveRefCntPtr<DummyFileSystem> Lower (new DummyFileSystem ());
348
- Lower->addRegularFile (" /foo" );
349
- IntrusiveRefCntPtr<DummyFileSystem> Upper (new DummyFileSystem ());
350
-
351
- IntrusiveRefCntPtr<vfs::OverlayFileSystem> O (
352
- new vfs::OverlayFileSystem (Lower));
353
- O->pushOverlay (Upper);
354
-
355
- ErrorOr<vfs::Status> Status ((std::error_code ()));
356
- {
357
- auto it = O->overlays_begin ();
358
- auto end = O->overlays_end ();
359
-
360
- EXPECT_NE (it, end);
361
-
362
- Status = (*it)->status (" /foo" );
363
- ASSERT_TRUE (Status.getError ());
364
-
365
- it++;
366
- EXPECT_NE (it, end);
367
-
368
- Status = (*it)->status (" /foo" );
369
- ASSERT_FALSE (Status.getError ());
370
- EXPECT_TRUE (Status->exists ());
371
-
372
- it++;
373
- EXPECT_EQ (it, end);
374
- }
375
-
376
- {
377
- auto it = O->overlays_rbegin ();
378
- auto end = O->overlays_rend ();
379
-
380
- EXPECT_NE (it, end);
381
-
382
- Status = (*it)->status (" /foo" );
383
- ASSERT_FALSE (Status.getError ());
384
- EXPECT_TRUE (Status->exists ());
385
-
386
- it++;
387
- EXPECT_NE (it, end);
388
-
389
- Status = (*it)->status (" /foo" );
390
- ASSERT_TRUE (Status.getError ());
391
-
392
- it++;
393
- EXPECT_EQ (it, end);
394
- }
395
- }
396
-
397
346
namespace {
398
347
struct ScopedDir {
399
348
SmallString<128 > Path;
You can’t perform that action at this time.
0 commit comments