From cc659af86c2a1a1e962faf8f27027645700ce64e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 16 Dec 2021 21:26:19 +0000 Subject: Remove seemingly pointless 'Run' class --- netfs/unittests/mockMount.cpp | 1 + netfs/unittests/testFuse.cpp | 18 ------------------ 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/netfs/unittests/mockMount.cpp b/netfs/unittests/mockMount.cpp index 7655296..515d2cc 100644 --- a/netfs/unittests/mockMount.cpp +++ b/netfs/unittests/mockMount.cpp @@ -17,6 +17,7 @@ FuseMountPoint::FuseMountPoint() : ::fuse_opt_add_arg(&fargs, "-oac_attr_timeout=0"); fs = ::fuse_new(&fargs, &operations, sizeof(fuse_operations), this); BOOST_REQUIRE(fs); + start(); } void diff --git a/netfs/unittests/testFuse.cpp b/netfs/unittests/testFuse.cpp index dd773b2..a95b956 100644 --- a/netfs/unittests/testFuse.cpp +++ b/netfs/unittests/testFuse.cpp @@ -41,31 +41,13 @@ get_lstat(const std::filesystem::path & p) BOOST_FIXTURE_TEST_SUITE(fmp, FuseMountPoint); -class Run { -public: - Run(FuseMountPoint * _p) : p {_p} - { - p->start(); - } - ~Run() - { - p->stop(); - } - SPECIAL_MEMBERS_DELETE(Run); - -private: - FuseMountPoint * p; -}; - BOOST_AUTO_TEST_CASE(fuse, *boost::unit_test::timeout(5)) { - Run r {this}; BOOST_REQUIRE(std::filesystem::is_directory(mntpnt)); } BOOST_AUTO_TEST_CASE(fuse_ls, *boost::unit_test::timeout(5)) { - Run r {this}; BOOST_REQUIRE(std::filesystem::is_directory(mntpnt)); BOOST_REQUIRE(std::filesystem::is_empty(mntpnt)); const auto rpath = mntpnt / "me"; -- cgit v1.2.3