Gromacs
2025.0-dev-20241031-615c9ed
|
#include "gmxpre.h"
#include "testutils/refdata.h"
#include <cctype>
#include <cinttypes>
#include <cstdlib>
#include <algorithm>
#include <filesystem>
#include <limits>
#include <list>
#include <memory>
#include <optional>
#include <ostream>
#include <string>
#include <utility>
#include <vector>
#include <gtest/gtest.h>
#include "gromacs/math/vectypes.h"
#include "gromacs/options/basicoptions.h"
#include "gromacs/options/ioptionscontainer.h"
#include "gromacs/utility/any.h"
#include "gromacs/utility/enumerationhelpers.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/keyvaluetree.h"
#include "gromacs/utility/path.h"
#include "gromacs/utility/real.h"
#include "gromacs/utility/stringutil.h"
#include "testutils/testasserts.h"
#include "testutils/testexceptions.h"
#include "testutils/testfilemanager.h"
#include "refdata_checkers.h"
#include "refdata_impl.h"
#include "refdata_xml.h"
Implements classes and functions from refdata.h.
Classes | |
class | gmx::test::internal::TestReferenceDataImpl |
Private implementation class for TestReferenceData. More... | |
class | gmx::test::TestReferenceChecker::Impl |
Private implementation class for TestReferenceChecker. More... | |
Typedefs | |
typedef std::shared_ptr < internal::TestReferenceDataImpl > | gmx::test::anonymous_namespace{refdata.cpp}::TestReferenceDataImplPointer |
Convenience typedef for a smart pointer to TestReferenceDataImpl. | |
Functions | |
ReferenceDataMode | gmx::test::referenceDataMode () |
Returns the global mode describing how reference data is handled. | |
TestReferenceDataImplPointer | gmx::test::anonymous_namespace{refdata.cpp}::initReferenceDataInstance (std::optional< std::filesystem::path > testNameOverride) |
Returns a reference to the global reference data object. | |
TestReferenceDataImplPointer | gmx::test::anonymous_namespace{refdata.cpp}::initReferenceDataInstanceForSelfTest (ReferenceDataMode mode) |
Handles reference data creation for self-tests. | |
std::string | gmx::test::anonymous_namespace{refdata.cpp}::formatEntryPath (const std::string &prefix, const std::string &id) |
Formats a path to a reference data entry with a non-null id. | |
std::string | gmx::test::anonymous_namespace{refdata.cpp}::formatSequenceEntryPath (const std::string &prefix, int seqIndex) |
Formats a path to a reference data entry with a null id. | |
void | gmx::test::anonymous_namespace{refdata.cpp}::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 | gmx::test::anonymous_namespace{refdata.cpp}::checkUnusedEntries (const ReferenceDataEntry &root, const std::string &rootPath) |
Produces a GTest assertion of any entries under given root have not been checked. | |
void | gmx::test::initReferenceData (IOptionsContainer *options) |
Initializes reference data handling. More... | |
static void | gmx::test::throwIfNonEmptyAndOnlyWhitespace (const std::string &s, const char *id) |
Throw a TestException if the caller tries to write particular refdata that can't work. More... | |
Variables | |
TestReferenceDataImplPointer | gmx::test::anonymous_namespace{refdata.cpp}::g_referenceData |
Global reference data instance. More... | |
ReferenceDataMode | gmx::test::anonymous_namespace{refdata.cpp}::g_referenceDataMode = ReferenceDataMode::Compare |
Global reference data mode set by the -ref-data command-line option. | |