Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::Runfiles Class Reference

Helper class to access bazel runfiles in a test environment. More...

#include "donner/base/tests/Runfiles.h"

Public Member Functions

std::string Rlocation (const std::string &path) const
 Get the runfile location for the given relative path.
 
std::string RlocationExternal (const std::string &repository, const std::string &path) const
 Get the runfile location for the given relative path in an external repository.
 

Static Public Member Functions

static Runfilesinstance ()
 Get the Runfiles singleton instance.
 

Detailed Description

Helper class to access bazel runfiles in a test environment.

To get the filename for a binary, use Runfiles::instance().Rlocation("path/to/file").

Member Function Documentation

◆ Rlocation()

std::string donner::Runfiles::Rlocation ( const std::string & path) const
inline

Get the runfile location for the given relative path.

Parameters
pathRelative path to the file.

◆ RlocationExternal()

std::string donner::Runfiles::RlocationExternal ( const std::string & repository,
const std::string & path ) const
inline

Get the runfile location for the given relative path in an external repository.

Parameters
repositoryExternal repository name, corresponding to the "@repo-name" in the BUILD file. If the name is "@repo-name", specify "repo-name" here.
pathRelative path to the file.

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