Gazebo Common

API Reference

5.6.0
gz/common/testing/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"

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

 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. More...
 
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. More...
 
template<typename... Args>
std::string SourceFile (Args const &... args)
 Get the path to a file in the project source tree. More...
 
template<typename... Args>
std::string TempPath (Args const &... args)
 Get the path to a file in a temporary directory. More...
 
BuildType GZ_COMMON_TESTING_VISIBLE TestBuildType (const std::string &_projectSourcePath=kTestingProjectSourceDir)
 Return the current build type. More...
 
template<typename... Args>
std::string TestFile (Args const &... args)
 Get the path to a file in the project test directory tree. More...
 
std::unique_ptr< TestPaths > GZ_COMMON_TESTING_VISIBLE TestPathFactory (const std::string &_projectSourcePath=kTestingProjectSourceDir)
 Get a TestPaths object for the current build type. More...
 

Variables

 kCMake
 
constexpr char kTestingProjectSourceDir [] = ""
 Constant referring to the project source dir of the current project. More...
 
 kUnknown
 

Macro Definition Documentation

◆ TESTING_PROJECT_SOURCE_DIR

#define TESTING_PROJECT_SOURCE_DIR   ""

Variable Documentation

◆ kCMake

kCMake

◆ kUnknown

kUnknown