Gazebo Common

API Reference

5.7.0
TestPaths Class Referenceabstract

Helper interface to generate path information to support test access to source/data files. More...

#include <TestPaths.hh>

Public Member Functions

GZ_COMMON_TESTING_VISIBLE TestPaths (const std::string &_projectSourcePath=kTestingProjectSourceDir)
 Constructor. More...
 
virtual GZ_COMMON_TESTING_VISIBLE ~TestPaths ()=0
 Destructor. More...
 
virtual bool GZ_COMMON_TESTING_VISIBLE ProjectSourcePath (std::string &_sourceDir)=0
 
virtual bool GZ_COMMON_TESTING_VISIBLE TestTmpPath (std::string &_tmpDir)=0
 Populate the path to a temporary directory. More...
 

Protected Attributes

std::string projectSourcePath
 Path to the root of the project source. More...
 

Detailed Description

Helper interface to generate path information to support test access to source/data files.

It is intended that there is an implementation of this interface for each relevant buildsystem.

Constructor & Destructor Documentation

◆ TestPaths()

GZ_COMMON_TESTING_VISIBLE TestPaths ( const std::string _projectSourcePath = kTestingProjectSourceDir)
explicit

Constructor.

Parameters
[in]_projectSourcePathPath to the root of the project source

◆ ~TestPaths()

virtual GZ_COMMON_TESTING_VISIBLE ~TestPaths ( )
pure virtual

Destructor.

Member Function Documentation

◆ ProjectSourcePath()

virtual bool GZ_COMMON_TESTING_VISIBLE ProjectSourcePath ( std::string _sourceDir)
pure virtual

brief Populate the path to the root project source directory

Parameters
[out]_sourceDirpath to the root project source directory
Returns
True if path successfully found and set, false otherwise

Implemented in CMakeTestPaths, and BazelTestPaths.

◆ TestTmpPath()

virtual bool GZ_COMMON_TESTING_VISIBLE TestTmpPath ( std::string _tmpDir)
pure virtual

Populate the path to a temporary directory.

Parameters
[out]_tmpDirpath to the root temporary directory
Returns
True if path successfully found and set, false otherwise

Implemented in CMakeTestPaths, and BazelTestPaths.

Member Data Documentation

◆ projectSourcePath

std::string projectSourcePath
protected

Path to the root of the project source.


The documentation for this class was generated from the following file: