preCICE v3.1.2
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions
Testing.hpp File Reference
#include <Eigen/Core>
#include <boost/test/unit_test.hpp>
#include <string>
#include <type_traits>
#include "math/differences.hpp"
#include "math/math.hpp"
#include "testing/TestContext.hpp"
#include "utils/IntraComm.hpp"
Include dependency graph for Testing.hpp:

Go to the source code of this file.

Classes

struct  precice::testing::WhiteboxAccessor
 struct giving access to the impl of a befriended class or struct More...
 

Namespaces

namespace  precice
 Main namespace of the precice library.
 
namespace  precice::testing
 contains the testing framework.
 
namespace  precice::testing::inject
 

Macros

#define PRECICE_TEST(...)
 

Functions

DataID precice::testing::operator""_dataID (unsigned long long n)
 
template<class DerivedA , class DerivedB >
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.
 
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
 
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 (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 precice::testing::equals (double a, double b, double tolerance)
 
std::string precice::testing::getPathToRepository ()
 Returns the base path of the repo.
 
std::string precice::testing::getPathToSources ()
 Returns the base path to the sources.
 
std::string precice::testing::getPathToTests ()
 Returns the base path to the integration tests.
 
std::string precice::testing::getTestName ()
 Returns the name of the current test.
 
std::string precice::testing::getTestPath ()
 Returns the full path to the file containing the current test.
 
int precice::testing::nextMeshID ()
 

Macro Definition Documentation

◆ PRECICE_TEST

#define PRECICE_TEST ( ...)
Value:
using namespace precice::testing::inject; \
precice::testing::TestContext context{__VA_ARGS__}; \
if (context.invalid) { \
return; \
} \
BOOST_TEST_MESSAGE(context.describe()); \
boost::unit_test::framework::add_context(BOOST_TEST_LAZY_MSG(context.describe()), true);

Definition at line 27 of file Testing.hpp.