#include <iostream>
#include <string>
#include <iosfwd>
#include <complex>
Go to the source code of this file.
Classes | |
class | test::TestCase |
Namespaces | |
namespace | test |
Macros | |
#define | _test(cond) do_test(cond, #cond, __FILE__, __LINE__) |
Tests if cond is true (test passed) or not (test failed) | |
#define | _numtest(num, orig) do_numtest(num, orig, #num, #orig, __FILE__, __LINE__) |
Tests if num and orig are equal up to a rel. difference of 1e-10. | |
#define | _numtesttol(num, orig, tol) do_numtest(num, orig, #num, #orig, __FILE__, __LINE__, tol) |
Tests if num and orig are equal up to a rel. difference of tol . | |
#define | _fail(str) do_fail(str, __FILE__, __LINE__) |
Explicitly fails a test. | |
Test from Chuck Allison in C/C++ Users Journal, September 2000: "The Simplest Automated Unit Test Framework That Could Possibly Work"
Definition in file testcase.hh.
#define _fail | ( | str | ) | do_fail(str, __FILE__, __LINE__) |
Explicitly fails a test.
Definition at line 82 of file testcase.hh.
#define _numtest | ( | num, | |
orig | |||
) | do_numtest(num, orig, #num, #orig, __FILE__, __LINE__) |
Tests if num
and orig
are equal up to a rel. difference of 1e-10.
Definition at line 78 of file testcase.hh.
#define _numtesttol | ( | num, | |
orig, | |||
tol | |||
) | do_numtest(num, orig, #num, #orig, __FILE__, __LINE__, tol) |
Tests if num
and orig
are equal up to a rel. difference of tol
.
Definition at line 80 of file testcase.hh.
#define _test | ( | cond | ) | do_test(cond, #cond, __FILE__, __LINE__) |
Tests if cond
is true (test passed) or not (test failed)
Definition at line 76 of file testcase.hh.