r201635 - Add an OverlayFileSystem class
Dmitri Gribenko
gribozavr at gmail.com
Wed Feb 19 02:06:13 PST 2014
On Wed, Feb 19, 2014 at 3:29 AM, Ben Langmuir <blangmuir at apple.com> wrote:
> +TEST(VirtualFileSystemTest, overlay_dirs) {
> + IntrusiveRefCntPtr<DummyFileSystem> Lower(new DummyFileSystem());
> + IntrusiveRefCntPtr<DummyFileSystem> Upper(new DummyFileSystem());
> + IntrusiveRefCntPtr<vfs::OverlayFileSystem>
> + O(new vfs::OverlayFileSystem(Lower));
> + O->pushOverlay(Upper);
> +
> + ErrorOr<vfs::Status> Status1((error_code())), Status2((error_code())),
> + Status3((error_code()));
> +
> + Lower->addDirectory("/lower-only");
> + Lower->addDirectory("/both");
> + Upper->addDirectory("/both");
> + Upper->addDirectory("/upper-only");
> +
> + // non-merged paths should be the same
> + ASSERT_TRUE(Status1 = Lower->status("/lower-only"));
> + ASSERT_TRUE(Status2 = O->status("/lower-only"));
> + EXPECT_TRUE(Status1->equivalent(*Status2));
> +
> + ASSERT_TRUE(Status1 = Lower->status("/lower-only"));
> + ASSERT_TRUE(Status2 = O->status("/lower-only"));
> + EXPECT_TRUE(Status1->equivalent(*Status2));
> +}
What was the purpose of "/both" and Status3 in this test?
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the cfe-commits
mailing list