v0.14.0
src
ftensor
tests
conformance
test_for_zero.hpp
Go to the documentation of this file.
1
#include <cmath>
2
#include <iostream>
3
#include <string>
4
5
#pragma once
6
7
template
<
class
T>
void
test_for_zero
(
const
T &
t
,
const
std::string &s) {
8
if
(std::abs(
t
) < 1e-8)
9
std::cout <<
"PASS: "
<< s <<
"\n"
;
10
else
{
11
std::cerr <<
"FAIL: "
<< s <<
" "
<< std::abs(
t
) <<
"\n"
;
12
std::exit(1);
13
}
14
}
test_for_zero
void test_for_zero(const T &t, const std::string &s)
Definition:
test_for_zero.hpp:7
t
constexpr double t
plate stiffness
Definition:
plate.cpp:58
Generated by
Doxygen
1.8.17 and hosted at