Gromacs  2025.0-dev-20241009-5c23d5f
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions
gmx::test::RefDataFilenameMaker< ParametersTuple > Class Template Reference

#include <testutils/include/testutils/naming.h>

Description

template<typename ParametersTuple>
class gmx::test::RefDataFilenameMaker< ParametersTuple >

Functor to name a refdata filename for this test.

We sometimes want the same reference data to apply to multiple test cases, e.g. because we implement multiple ways to do the same thing and want to check that all implementations match the same reference data.

That means we need to store the reference data in a file whose name relates only to the test parameters that change the values, and not those that describe different implementations. In such cases, we cannot simple re-use the name provided by NameOfTestFromTuple.

By default, the reference data filename is set via a call to gmx::TestFileManager::getTestSpecificFileName() that queries GoogleTest and gets a string that includes the return value for NameOfTestFromTuple::operator(). This code works similarly, but generally the user passes different formatters for some parameters, so that some of the test parameters do not contribute to the name produced.

Public Types

using Formatters = typename detail::ParamsToFormatterVariants< ParametersTuple >::type
 

Public Member Functions

 RefDataFilenameMaker (Formatters formatters)
 Constructor.
 
std::filesystem::path operator() (const ParametersTuple &params) const
 Functor to make the reference-data filename requested.
 

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