TestPaths.hh File Reference
#include <memory>#include <string>#include "gz/common/Filesystem.hh"#include "gz/common/TempDirectory.hh"#include "gz/common/Util.hh"#include "gz/common/testing/Export.hh"#include <gz/utils/SuppressWarning.hh>Go to the source code of this file.
Classes | |
| class | TestPaths |
| Helper interface to generate path information to support test access to source/data files. More... | |
Namespaces | |
| namespace | testing |
Macros | |
| #define | TESTING_PROJECT_SOURCE_DIR "" |
Functions | |
| std::shared_ptr< TempDirectory > | MakeTestTempDirectory (const std::string &_prefix="test", const std::string &_subDir="gz", bool _cleanup=true) |
| Create a temporary directory for test output in an OS and build appropriate location. | |
| std::shared_ptr< TempDirectory > GZ_COMMON_TESTING_VISIBLE | MakeTestTempDirectoryImpl (const std::string &_projectSourcePath, const std::string &_prefix="test", const std::string &_subDir="gz", bool _cleanup=true) |
| Implementation of MakeTestTempDirectory. | |
| template<typename... Args> | |
| std::string | SourceFile (Args const &... args) |
| Get the path to a file in the project source tree. | |
| template<typename... Args> | |
| std::string | TempPath (Args const &... args) |
| Get the path to a file in a temporary directory. | |
| BuildType GZ_COMMON_TESTING_VISIBLE | TestBuildType (const std::string &_projectSourcePath=kTestingProjectSourceDir) |
| Return the current build type. | |
| template<typename... Args> | |
| std::string | TestFile (Args const &... args) |
| Get the path to a file in the project test directory tree. | |
| std::unique_ptr< TestPaths > GZ_COMMON_TESTING_VISIBLE | TestPathFactory (const std::string &_projectSourcePath=kTestingProjectSourceDir) |
| Get a TestPaths object for the current build type. | |
Variables | |
| kCMake | |
| constexpr char | kTestingProjectSourceDir [] = "" |
| Constant referring to the project source dir of the current project. | |
| kUnknown | |
Macro Definition Documentation
◆ TESTING_PROJECT_SOURCE_DIR
| #define TESTING_PROJECT_SOURCE_DIR "" |
Variable Documentation
◆ kCMake
| kCMake |
◆ kUnknown
| kUnknown |