Celeritas  0.5.0-56+6b053cd
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
celeritas::test::Test Class Reference

Googletest test harness for Celeritas codes. More...

#include <Test.hh>

Inheritance diagram for celeritas::test::Test:
Inheritance graph
[legend]

Public Member Functions

std::string make_unique_filename (std::string_view ext={})
 Generate test-unique filename.
 

Static Public Member Functions

static std::string test_data_path (std::string_view subdir, std::string_view filename)
 Get the path to a test file at {source}/test/{subdir}/data/{filename}. More...
 
static std::string genericize_pointers (std::string_view s)
 Replace pointer addresses with 0x0 for improved testability.
 
static bool strict_testing ()
 True if strict testing is required. More...
 

Static Public Attributes

static constexpr double inf = HUGE_VAL
 
static constexpr float inff = HUGE_VALF
 
static constexpr double coarse_eps = 1e-6
 

Detailed Description

Googletest test harness for Celeritas codes.

The test harness is constructed and destroyed once per subtest. It contains helper functions and data commonly needed in Celeritas tests.

Member Function Documentation

◆ strict_testing()

bool celeritas::test::Test::strict_testing ( )
static

True if strict testing is required.

This is set during CI tests so that "loose" tests (which might depend on the environment) are enabled inside the CI.

◆ test_data_path()

std::string celeritas::test::Test::test_data_path ( std::string_view  subdir,
std::string_view  filename 
)
static

Get the path to a test file at {source}/test/{subdir}/data/{filename}.

Postcondition
The given input file exists. (ifstream is used to check this)

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