preCICE
v3.2.0
Loading...
Searching...
No Matches
src
math
tests
MathTest.cpp
Go to the documentation of this file.
1
#include "
logging/LogMacros.hpp
"
2
#include "
logging/Logger.hpp
"
3
#include "
math/math.hpp
"
4
#include "
testing/TestContext.hpp
"
5
#include "
testing/Testing.hpp
"
6
7
using namespace
precice
;
8
9
BOOST_AUTO_TEST_SUITE
(MathTests)
10
11
PRECICE_TEST_SETUP
(1_rank)
12
BOOST_AUTO_TEST_CASE
(IntegerExponent)
13
{
14
PRECICE_TEST
();
15
BOOST_TEST(
math::pow_int<4>
(4.2) ==
std::pow
(4.2, 4));
16
BOOST_TEST(
math::pow_int<3>
(7.2) ==
std::pow
(7.2, 3));
17
}
18
BOOST_AUTO_TEST_SUITE_END
()
// Math
BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(testIQNIMVJPPWithSubsteps)
Definition
AccelerationSerialTest.cpp:122
LogMacros.hpp
Logger.hpp
BOOST_AUTO_TEST_SUITE
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END
BOOST_AUTO_TEST_SUITE_END()
TestContext.hpp
Testing.hpp
PRECICE_TEST
#define PRECICE_TEST()
Definition
Testing.hpp:39
PRECICE_TEST_SETUP
#define PRECICE_TEST_SETUP(...)
Creates and attaches a TestSetup to a Boost test case.
Definition
Testing.hpp:29
math.hpp
precice::math::pow_int
constexpr T pow_int(const T x)
Computes the power of a given number by an integral exponent given at compile time,...
Definition
math.hpp:22
precice
Main namespace of the precice library.
Definition
Acceleration.cpp:5
std::pow
T pow(T... args)