20 #ifdef USE_TESTMANAGER
27 int verify(
const double result,
const double expected,
double eps)
31 int verify_result = 0;
41 eps = pow(10.0, -precision);
51 vout.
general(vl,
"result: %15.14le expected: %15.14le\n", result, expected);
54 if (fabs(expected) > eps) {
55 diff = (result - expected) / expected;
57 diff = result - expected;
60 if (fabs(diff) <= eps) {
64 vout.
general(vl,
"test result: incorrect! (T_T)\n");
67 vout.
general(vl,
"diff: expected - result = %15.14le\n", diff);
static double epsilon_criterion()
void general(const char *format,...)
static Bridge::VerboseLevel Vlevel()
int getCheckPrecision() const
static const int default_precision
static TestManager & Instance()
int verify(const double result, const double expected, double eps)