Chebyshev
Unit testing for scientific software
fail.h
Go to the documentation of this file.
1 
5 
6 #ifndef CHEBYSHEV_FAIL_H
7 #define CHEBYSHEV_FAIL_H
8 
9 #include "./prec_structures.h"
10 
11 
12 namespace chebyshev {
13 namespace prec {
14 
21  namespace fail {
22 
23 
26  inline auto fail_on_max_err() {
27  return [](const estimate_result& r) -> bool {
28  return (r.maxErr > r.tolerance) || (r.maxErr != r.maxErr);
29  };
30  }
31 
32 
35  inline auto fail_on_mean_err() {
36  return [](const estimate_result& r) -> bool {
37  return (r.meanErr > r.tolerance) || (r.meanErr != r.meanErr);
38  };
39  }
40 
41 
44  inline auto fail_on_rms_err() {
45  return [](const estimate_result& r) -> bool {
46  return (r.rmsErr > r.tolerance) || (r.rmsErr != r.rmsErr);
47  };
48  }
49 
50 
53  inline auto fail_on_rel_err() {
54  return [](const estimate_result& r) -> bool {
55  return (r.relErr > r.tolerance) || (r.relErr != r.relErr);
56  };
57  }
58 
59  }
60 }}
61 
62 
63 #endif
auto fail_on_mean_err()
Marks the test as failed if the mean error on the domain is bigger than the tolerance or the error is...
Definition: fail.h:35
auto fail_on_rel_err()
Marks the test as failed if the relative error on the domain is bigger than the tolerance or the erro...
Definition: fail.h:53
auto fail_on_max_err()
Default fail function which marks the test as failed if the maximum error on the domain is bigger tha...
Definition: fail.h:26
auto fail_on_rms_err()
Marks the test as failed if the RMS error on the domain is bigger than the tolerance or the error is ...
Definition: fail.h:44
General namespace of the framework.
Definition: benchmark_structures.h:16
Structures for precision testing.
A structure holding the result of precision estimation.
Definition: prec_structures.h:25