preCICE v3.1.2
|
contains the testing framework. More...
Namespaces | |
namespace | com |
namespace | inject |
Classes | |
struct | ConnectionOptions |
class | DataContextFixture |
struct | ParallelCouplingSchemeFixture |
struct | ParticipantState |
Represents a ParticipantState in a test. More... | |
struct | Ranks |
struct | SerialCouplingSchemeFixture |
class | TestContext |
class | WaveformFixture |
struct | WhiteboxAccessor |
struct giving access to the impl of a befriended class or struct More... | |
Typedefs | |
using | Par = utils::Parallel |
Enumerations | |
enum class | Require { PETSc , Events } |
enum struct | ConnectionType { GatherScatter , PointToPoint } |
Functions | |
cplscheme::PtrCouplingData | makeCouplingData (mesh::PtrData data, mesh::PtrMesh mesh, bool exchangeSubsteps) |
cplscheme::PtrCouplingData | makeCouplingData (mesh::PtrData data, mesh::PtrMesh mesh) |
boost::unit_test::log_level | getBoostTestLogLevel () |
Boost test Initialization function. | |
std::string | filterFromLogLevel (boost::unit_test::log_level logLevel) |
void | setupTestLogging () |
constexpr Ranks | operator""_ranks (unsigned long long value) |
constexpr Ranks | operator""_rank (unsigned long long value) |
ParticipantState | operator""_on (const char *name, std::size_t) |
User-defined literal allowing to create a serial ParticipantState from a given string. | |
DataID | operator""_dataID (unsigned long long n) |
std::string | getPathToRepository () |
Returns the base path of the repo. | |
std::string | getPathToSources () |
Returns the base path to the sources. | |
std::string | getPathToTests () |
Returns the base path to the integration tests. | |
std::string | getTestPath () |
Returns the full path to the file containing the current test. | |
std::string | getTestName () |
Returns the name of the current test. | |
int | nextMeshID () |
boost::test_tools::predicate_result | equals (const std::vector< float > &VectorA, const std::vector< float > &VectorB, float tolerance) |
equals to be used in tests. Compares two std::vectors using a given tolerance. Prints both operands on failure | |
boost::test_tools::predicate_result | equals (const std::vector< double > &VectorA, const std::vector< double > &VectorB, double tolerance) |
boost::test_tools::predicate_result | equals (float a, float b, float tolerance=math::NUMERICAL_ZERO_DIFFERENCE) |
equals to be used in tests. Compares two scalar numbers using a given tolerance. Prints both operands on failure | |
boost::test_tools::predicate_result | equals (double a, double b, double tolerance) |
template<class DerivedA , class DerivedB > | |
boost::test_tools::predicate_result | equals (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, double tolerance=math::NUMERICAL_ZERO_DIFFERENCE) |
equals to be used in tests. Compares two matrices using a given tolerance. Prints both operands on failure. | |
contains the testing framework.
using precice::testing::Par = utils::Parallel |
Definition at line 31 of file TestContext.cpp.
|
strong |
A type of distributed connection
Enumerator | |
---|---|
GatherScatter | |
PointToPoint |
Definition at line 110 of file TestContext.hpp.
|
strong |
Defines requirements for a test setup
Enumerator | |
---|---|
PETSc | Require to initialize PETSc. This implies the initialization of Events. |
Events | Require to initialize Event. |
Definition at line 99 of file TestContext.hpp.
boost::test_tools::predicate_result precice::testing::equals | ( | const Eigen::MatrixBase< DerivedA > & | A, |
const Eigen::MatrixBase< DerivedB > & | B, | ||
double | tolerance = math::NUMERICAL_ZERO_DIFFERENCE ) |
equals to be used in tests. Compares two matrices using a given tolerance. Prints both operands on failure.
Definition at line 55 of file Testing.hpp.
boost::test_tools::predicate_result precice::testing::equals | ( | const std::vector< double > & | VectorA, |
const std::vector< double > & | VectorB, | ||
double | tolerance ) |
boost::test_tools::predicate_result precice::testing::equals | ( | const std::vector< float > & | VectorA, |
const std::vector< float > & | VectorB, | ||
float | tolerance ) |
equals to be used in tests. Compares two std::vectors using a given tolerance. Prints both operands on failure
Definition at line 65 of file Testing.cpp.
boost::test_tools::predicate_result precice::testing::equals | ( | double | a, |
double | b, | ||
double | tolerance ) |
boost::test_tools::predicate_result precice::testing::equals | ( | float | a, |
float | b, | ||
float | tolerance ) |
equals to be used in tests. Compares two scalar numbers using a given tolerance. Prints both operands on failure
Definition at line 89 of file Testing.cpp.
std::string precice::testing::filterFromLogLevel | ( | boost::unit_test::log_level | logLevel | ) |
Definition at line 45 of file GlobalFixtures.cpp.
boost::unit_test::log_level precice::testing::getBoostTestLogLevel | ( | ) |
Boost test Initialization function.
Boost Test Log Levels and corresponding command line arguments to –log_level as of Boost 1.68:
Definition at line 34 of file GlobalFixtures.cpp.
std::string precice::testing::getPathToRepository | ( | ) |
Returns the base path of the repo.
Definition at line 25 of file Testing.cpp.
std::string precice::testing::getPathToSources | ( | ) |
Returns the base path to the sources.
Definition at line 31 of file Testing.cpp.
std::string precice::testing::getPathToTests | ( | ) |
Returns the base path to the integration tests.
Definition at line 36 of file Testing.cpp.
std::string precice::testing::getTestName | ( | ) |
Returns the name of the current test.
Definition at line 47 of file Testing.cpp.
std::string precice::testing::getTestPath | ( | ) |
Returns the full path to the file containing the current test.
Definition at line 41 of file Testing.cpp.
|
inline |
Definition at line 10 of file helper.hpp.
|
inline |
Definition at line 10 of file helper.hpp.
int precice::testing::nextMeshID | ( | ) |
Generates a new mesh id for use in tests.
Definition at line 58 of file Testing.cpp.
DataID precice::testing::operator""_dataID | ( | unsigned long long | n | ) |
Definition at line 19 of file Testing.cpp.
|
inline |
User-defined literal allowing to create a serial ParticipantState from a given string.
Definition at line 86 of file TestContext.hpp.
|
inlineconstexpr |
User-defined literal for expressively defining a single rank
[in] | value | the amount of ranks which has to be 1 |
Definition at line 40 of file TestContext.hpp.
|
inlineconstexpr |
User-defined literal for expressively defining multiple ranks
[in] | value | the amount of ranks <= 1 |
Definition at line 29 of file TestContext.hpp.
void precice::testing::setupTestLogging | ( | ) |