Gromacs  2024.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions | Variables
gmx::test::anonymous_namespace{pmetest.cpp} Namespace Reference


class  PmeTest
 Test fixture for end-to-end execution of PME. More...


using PmeTestParameters = std::tuple< PmeTestFlavor, std::string >


enum  PmeTestFlavor : int { Basic, WithWalls, Count }
 Enum describing the flavors of PME tests that are run.


const char * enumValueToString (const PmeTestFlavor enumValue)
 Helper to print a string to describe the PME test flavor.
std::string nameOfTest (const testing::TestParamInfo< PmeTestParameters > &info)
 Help GoogleTest name our tests. More...
std::string makeRefDataFileName ()
 Construct a refdata filename for this test. More...


const auto c_reproducesEnergies

Function Documentation

std::string gmx::test::anonymous_namespace{pmetest.cpp}::makeRefDataFileName ( )

Construct a refdata filename for this test.

We want the same reference data to apply to every mdrun command line that we test. That means we need to store it in a file whose name relates to the name of the test excluding the part related to the mdrun command line. 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 nameOfTest(). This code works similarly, but removes the aforementioned part. This logic must match the implementation of nameOfTest() so that it works as intended.

std::string gmx::test::anonymous_namespace{pmetest.cpp}::nameOfTest ( const testing::TestParamInfo< PmeTestParameters > &  info)

Help GoogleTest name our tests.

If changes are needed here, consider making matching changes in makeRefDataFileName().

Variable Documentation

const auto gmx::test::anonymous_namespace{pmetest.cpp}::c_reproducesEnergies
Initial value:
= ::testing::ValuesIn(std::vector<PmeTestParameters>{ {
{ PmeTestFlavor::Basic, "-notunepme -npme 0 -pme cpu" },
{ PmeTestFlavor::Basic, "-notunepme -npme 0 -pme auto" },
{ PmeTestFlavor::Basic, "-notunepme -npme 0 -pme gpu -pmefft cpu" },
{ PmeTestFlavor::Basic, "-notunepme -npme 0 -pme gpu -pmefft gpu" },
{ PmeTestFlavor::Basic, "-notunepme -npme 0 -pme gpu -pmefft auto" },
{ PmeTestFlavor::WithWalls, "-notunepme -npme 0 -pme cpu" },
{ PmeTestFlavor::WithWalls, "-notunepme -npme 0 -pme gpu -pmefft cpu" },
{ PmeTestFlavor::WithWalls, "-notunepme -npme 0 -pme gpu -pmefft gpu" },
{ PmeTestFlavor::Basic, "-notunepme -npme 1 -pme cpu" },
{ PmeTestFlavor::Basic, "-notunepme -npme 1 -pme auto" },
{ PmeTestFlavor::Basic, "-notunepme -npme 1 -pme gpu -pmefft cpu" },
{ PmeTestFlavor::Basic, "-notunepme -npme 1 -pme gpu -pmefft gpu" },
{ PmeTestFlavor::Basic, "-notunepme -npme 1 -pme gpu -pmefft auto" },
{ PmeTestFlavor::WithWalls, "-notunepme -npme 1 -pme cpu" },
{ PmeTestFlavor::WithWalls, "-notunepme -npme 1 -pme gpu -pmefft cpu" },
{ PmeTestFlavor::WithWalls, "-notunepme -npme 1 -pme gpu -pmefft gpu" },
{ PmeTestFlavor::Basic, "-tunepme -npme 0 -pme cpu" },
{ PmeTestFlavor::Basic, "-tunepme -npme 0 -pme gpu -pmefft cpu" },
{ PmeTestFlavor::Basic, "-tunepme -npme 0 -pme gpu -pmefft gpu" },
} })