Class Dune::XT::Common::Test::CurrentPathGuard¶
-
class Dune::XT::Common::Test::CurrentPathGuard¶
Switches the working directory for the duration of the scope, creating it if need be.
Some of the code under test writes to hardcoded relative paths (“data/log/…” for instance). Running such a test from inside a directory of its own keeps those files off the shared build directory, where a stale copy or a concurrently running test binary could otherwise interfere.
Note
Declare this after the ScopedTestDir it moves into, so that it is destroyed first and the directory’s own (relative) cleanup still resolves against the original working directory.
Method Dune::XT::Common::Test::CurrentPathGuard::operator=¶
-
CurrentPathGuard &Dune::XT::Common::Test::CurrentPathGuard::operator=(const CurrentPathGuard&) = delete¶
No documentation provided.
Method Dune::XT::Common::Test::CurrentPathGuard::operator=¶
-
CurrentPathGuard &Dune::XT::Common::Test::CurrentPathGuard::operator=(CurrentPathGuard&&) = delete¶
No documentation provided.
Constructor Dune::XT::Common::Test::CurrentPathGuard::CurrentPathGuard¶
-
explicit Dune::XT::Common::Test::CurrentPathGuard::CurrentPathGuard(const std::string &path)¶
No documentation provided.
Constructor Dune::XT::Common::Test::CurrentPathGuard::CurrentPathGuard¶
-
Dune::XT::Common::Test::CurrentPathGuard::CurrentPathGuard(const CurrentPathGuard&) = delete¶
No documentation provided.
Constructor Dune::XT::Common::Test::CurrentPathGuard::CurrentPathGuard¶
-
Dune::XT::Common::Test::CurrentPathGuard::CurrentPathGuard(CurrentPathGuard&&) = delete¶
No documentation provided.
Destructor Dune::XT::Common::Test::CurrentPathGuard::~CurrentPathGuard¶
-
Dune::XT::Common::Test::CurrentPathGuard::~CurrentPathGuard()¶
No documentation provided.
Field Dune::XT::Common::Test::CurrentPathGuard::previous_¶
-
const boost::filesystem::path Dune::XT::Common::Test::CurrentPathGuard::previous_¶
No documentation provided.