#include "rutz/error.h"
#include "rutz/fileposition.h"
#include "rutz/sfmt.h"
#include <cmath>
#include "rutz/debug.h"
Go to the source code of this file.
Namespaces | |
namespace | rutz |
Defines | |
#define | TEST_REQUIRE(expr) rutz::test_require(bool(expr), #expr, SRC_POS) |
#define | TEST_REQUIRE_EQ(expr1, expr2) |
#define | TEST_REQUIRE_APPROX(expr1, expr2, tol) |
#define | DEF_TEST(pkg, func) pkg->def(#func, "", &func, SRC_POS) |
Functions | |
void | rutz::test_require (bool expr, const char *expr_string, const rutz::file_pos &pos) |
template<class T, class U> | |
void | rutz::test_require_eq (const T &expr1, const U &expr2, const char *expr_string1, const char *expr_string2, const rutz::file_pos &pos) |
bool | rutz::approx_eq (double a, double b, double tol=APPROX_TOL) |
void | rutz::test_require_approx_eq (double expr1, double expr2, double tol, const char *expr_string1, const char *expr_string2, const rutz::file_pos &pos) |
Variables | |
const double | rutz::APPROX_TOL = 1e-40 |
Definition in file unittest.h.
#define TEST_REQUIRE_APPROX | ( | expr1, | |||
expr2, | |||||
tol | ) |
Value:
rutz::test_require_approx_eq(expr1, expr2, tol, \ #expr1, #expr2, SRC_POS)
Definition at line 129 of file unittest.h.
#define TEST_REQUIRE_EQ | ( | expr1, | |||
expr2 | ) |
Value:
rutz::test_require_eq(expr1, expr2, \ #expr1, #expr2, SRC_POS)
Definition at line 125 of file unittest.h.