Gromacs  2025-dev-20240910-a7e2421
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Typedefs | Functions | Variables
gmx::test::anonymous_namespace{refdata.cpp} Namespace Reference

Typedefs

typedef std::shared_ptr
< internal::TestReferenceDataImpl
TestReferenceDataImplPointer
 Convenience typedef for a smart pointer to TestReferenceDataImpl.
 

Functions

TestReferenceDataImplPointer initReferenceDataInstance (std::optional< std::filesystem::path > testNameOverride)
 Returns a reference to the global reference data object.
 
TestReferenceDataImplPointer initReferenceDataInstanceForSelfTest (ReferenceDataMode mode)
 Handles reference data creation for self-tests.
 
std::string formatEntryPath (const std::string &prefix, const std::string &id)
 Formats a path to a reference data entry with a non-null id.
 
std::string formatSequenceEntryPath (const std::string &prefix, int seqIndex)
 Formats a path to a reference data entry with a null id.
 
void gatherUnusedEntries (const ReferenceDataEntry &root, const std::string &rootPath, std::vector< std::string > *unusedPaths)
 Finds all entries that have not been checked under a given root.
 
void checkUnusedEntries (const ReferenceDataEntry &root, const std::string &rootPath)
 Produces a GTest assertion of any entries under given root have not been checked.
 

Variables

TestReferenceDataImplPointer g_referenceData
 Global reference data instance. More...
 
ReferenceDataMode g_referenceDataMode = ReferenceDataMode::Compare
 Global reference data mode set by the -ref-data command-line option.
 

Variable Documentation

TestReferenceDataImplPointer gmx::test::anonymous_namespace{refdata.cpp}::g_referenceData

Global reference data instance.

The object is created when the test creates a TestReferenceData, and the object is destructed (and other post-processing is done) at the end of each test by ReferenceDataTestEventListener (which is installed as a Google Test test listener).