![]() |
SLIDE
3.0.0
A simulator for lithium-ion battery pack degradation
|
Namespaces | |
namespace | unit |
Functions | |
bool | TEST (auto &&fun, auto &&fun_name) |
Test function wrapper. More... | |
bool | NEAR (auto x1, auto x2, double abs_error=1e-15) |
Check if two values are nearly equal within a given absolute error. More... | |
bool | EQ (double x1, double x2) |
Check if two doubles are equal (wrapper for NEAR function). More... | |
Variables | |
constexpr bool | DEBUG_TESTS = false |
bool slide::tests::EQ | ( | double | x1, |
double | x2 | ||
) |
Check if two doubles are equal (wrapper for NEAR function).
x1 | First double value to compare. |
x2 | Second double value to compare. |
bool slide::tests::NEAR | ( | auto | x1, |
auto | x2, | ||
double | abs_error = 1e-15 |
||
) |
Check if two values are nearly equal within a given absolute error.
x1 | First value to compare. |
x2 | Second value to compare. |
abs_error | The allowed absolute error between the two values (default: 1e-15). |
bool slide::tests::TEST | ( | auto && | fun, |
auto && | fun_name | ||
) |
Test function wrapper.
fun | Function to be tested. |
fun_name | Name of the function to be tested. |
|
constexpr |