|
FEAT 3
Finite Element Analysis Toolbox
|
#include <kernel/base_header.hpp>#include <kernel/backend.hpp>#include <kernel/util/type_traits.hpp>#include <kernel/util/exception.hpp>#include <kernel/util/math.hpp>#include <string>#include <exception>#include <list>#include <typeinfo>#include <cstdlib>#include <iostream>#include <algorithm>#include <cmath>Go to the source code of this file.
Classes | |
| class | FEAT::TestSystem::TestFailedException |
| exception thrown by the check method in UnitTest More... | |
| class | FEAT::TestSystem::TestList |
| list of all instantiated tests More... | |
| class | FEAT::TestSystem::TestList::DeleteOnDestruction |
| class | FEAT::TestSystem::UnitTest |
| base class for all Tests More... | |
Namespaces | |
| namespace | FEAT |
| FEAT namespace. | |
| namespace | FEAT::TestSystem |
| TestSystem namespace. | |
Macros | |
| #define | CHECK_INTERNAL(was_ok, message) |
| #define | SPAWN_UNIT_TEST_0T(c, ...) static c FEAT_CONCAT(unit_test_, __COUNTER__) |
| spawns a unit test of class c with 0 template parameters and no constructor arguments More... | |
| #define | SPAWN_UNIT_TEST_0T_P(c, ...) static c FEAT_CONCAT(unit_test_, __COUNTER__)(__VA_ARGS__) |
| spawns a unit test of class c with 0 template parameters and a variadic number of constructor arguments More... | |
| #define | SPAWN_UNIT_TEST_1T(c, t1) static c<t1> FEAT_CONCAT(unit_test_, __COUNTER__) |
| spawns a unit test of class c with 1 template parameters and no constructor arguments More... | |
| #define | SPAWN_UNIT_TEST_1T_P(c, t1, ...) static c<t1> FEAT_CONCAT(unit_test_, __COUNTER__)(__VA_ARGS__) |
| spawns a unit test of class c with 1 template parameter and a variadic number of constructor arguments More... | |
| #define | SPAWN_UNIT_TEST_2T(c, t1, t2) static c<t1,t2> FEAT_CONCAT(unit_test_, __COUNTER__) |
| spawns a unit test of class c with 2 template parameters and no constructor arguments More... | |
| #define | SPAWN_UNIT_TEST_2T_P(c, t1, t2, ...) static c<t1,t2> FEAT_CONCAT(unit_test_, __COUNTER__)(__VA_ARGS__) |
| spawns a unit test of class c with 2 template parameters and a variadic number of constructor arguments More... | |
| #define | SPAWN_UNIT_TEST_3T(c, t1, t2, t3) static c<t1,t2,t3> FEAT_CONCAT(unit_test_, __COUNTER__) |
| spawns a unit test of class c with 3 template parameters and no constructor arguments More... | |
| #define | SPAWN_UNIT_TEST_3T_P(c, t1, t2, t3, ...) static c<t1,t2,t3> FEAT_CONCAT(unit_test_, __COUNTER__)(__VA_ARGS__) |
| spawns a unit test of class c with 3 template parameters and a variadic number of constructor arguments More... | |
| #define | SPAWN_UNIT_TEST_4T(c, t1, t2, t3, t4) static c<t1,t2,t3,t4> FEAT_CONCAT(unit_test_, __COUNTER__) |
| spawns a unit test of class c with 4 template parameters and no constructor arguments More... | |
| #define | SPAWN_UNIT_TEST_4T_P(c, t1, t2, t3, t4, ...) static c<t1,t2,t3,t4> FEAT_CONCAT(unit_test_, __COUNTER__)(__VA_ARGS__) |
| spawns a unit test of class c with 4 template parameters and a variadic number of constructor arguments More... | |
| #define | SPAWN_UNIT_TEST_5T(c, t1, t2, t3, t4, t5) static c<t1,t2,t3,t4,t5> FEAT_CONCAT(unit_test_, __COUNTER__) |
| spawns a unit test of class c with 5 template parameters and no constructor arguments More... | |
| #define | SPAWN_UNIT_TEST_5T_P(c, t1, t2, t3, t4, t5, ...) static c<t1,t2,t3,t4,t5> FEAT_CONCAT(unit_test_, __COUNTER__)(__VA_ARGS__) |
| spawns a unit test of class c with 5 template parameters and a variadic number of constructor arguments More... | |
| #define | TEST(pre, test, post) |
| runs the given test with pre- and postprocessing More... | |
| #define | TEST_CHECK(a) |
| checks if a is true More... | |
| #define | TEST_CHECK_EQUAL(a, b) |
| checks if a == b More... | |
| #define | TEST_CHECK_EQUAL_WITHIN_EPS(a, b, eps) |
| checks if |a - b| <= epsilon More... | |
| #define | TEST_CHECK_IN_RANGE(x, a, b) |
| checks if a <= x <= b More... | |
| #define | TEST_CHECK_LESS_THAN(a, b) |
| checks if a < b More... | |
| #define | TEST_CHECK_MSG(a, msg) |
checks if a is true; prints msg if a is false More... | |
| #define | TEST_CHECK_NOT_EQUAL(a, b) |
| checks if a != b More... | |
| #define | TEST_CHECK_RELATIVE(a, b, eps) |
| checks if |a - b| <= epsilon*|b| More... | |
| #define | TEST_CHECK_STRINGIFY_EQUAL(a, b) |
| checks if stringify(a) == stringify(b) More... | |
| #define | TEST_CHECK_THROWS(a, b) |
| checks if a throws an exception of type b More... | |
Functions | |
| template<typename DT_ > | |
| DT_ | FEAT::TestSystem::relaxed_tol () |
| template<> | |
| double | FEAT::TestSystem::relaxed_tol< double > () |
| template<> | |
| float | FEAT::TestSystem::relaxed_tol< float > () |
| template<typename DT_ > | |
| DT_ | FEAT::TestSystem::tol () |
| template<> | |
| double | FEAT::TestSystem::tol< double > () |
| template<> | |
| float | FEAT::TestSystem::tol< float > () |
Implementation of Test and related classes.
Definition in file test_system.hpp.
| #define CHECK_INTERNAL | ( | was_ok, | |
| message | |||
| ) |
Definition at line 24 of file test_system.hpp.
| #define SPAWN_UNIT_TEST_0T | ( | c, | |
| ... | |||
| ) | static c FEAT_CONCAT(unit_test_, __COUNTER__) |
spawns a unit test of class c with 0 template parameters and no constructor arguments
Definition at line 475 of file test_system.hpp.
| #define SPAWN_UNIT_TEST_0T_P | ( | c, | |
| ... | |||
| ) | static c FEAT_CONCAT(unit_test_, __COUNTER__)(__VA_ARGS__) |
spawns a unit test of class c with 0 template parameters and a variadic number of constructor arguments
Definition at line 493 of file test_system.hpp.
| #define SPAWN_UNIT_TEST_1T | ( | c, | |
| t1 | |||
| ) | static c<t1> FEAT_CONCAT(unit_test_, __COUNTER__) |
spawns a unit test of class c with 1 template parameters and no constructor arguments
Definition at line 478 of file test_system.hpp.
| #define SPAWN_UNIT_TEST_1T_P | ( | c, | |
| t1, | |||
| ... | |||
| ) | static c<t1> FEAT_CONCAT(unit_test_, __COUNTER__)(__VA_ARGS__) |
spawns a unit test of class c with 1 template parameter and a variadic number of constructor arguments
Definition at line 496 of file test_system.hpp.
| #define SPAWN_UNIT_TEST_2T | ( | c, | |
| t1, | |||
| t2 | |||
| ) | static c<t1,t2> FEAT_CONCAT(unit_test_, __COUNTER__) |
spawns a unit test of class c with 2 template parameters and no constructor arguments
Definition at line 481 of file test_system.hpp.
| #define SPAWN_UNIT_TEST_2T_P | ( | c, | |
| t1, | |||
| t2, | |||
| ... | |||
| ) | static c<t1,t2> FEAT_CONCAT(unit_test_, __COUNTER__)(__VA_ARGS__) |
spawns a unit test of class c with 2 template parameters and a variadic number of constructor arguments
Definition at line 499 of file test_system.hpp.
| #define SPAWN_UNIT_TEST_3T | ( | c, | |
| t1, | |||
| t2, | |||
| t3 | |||
| ) | static c<t1,t2,t3> FEAT_CONCAT(unit_test_, __COUNTER__) |
spawns a unit test of class c with 3 template parameters and no constructor arguments
Definition at line 484 of file test_system.hpp.
| #define SPAWN_UNIT_TEST_3T_P | ( | c, | |
| t1, | |||
| t2, | |||
| t3, | |||
| ... | |||
| ) | static c<t1,t2,t3> FEAT_CONCAT(unit_test_, __COUNTER__)(__VA_ARGS__) |
spawns a unit test of class c with 3 template parameters and a variadic number of constructor arguments
Definition at line 502 of file test_system.hpp.
| #define SPAWN_UNIT_TEST_4T | ( | c, | |
| t1, | |||
| t2, | |||
| t3, | |||
| t4 | |||
| ) | static c<t1,t2,t3,t4> FEAT_CONCAT(unit_test_, __COUNTER__) |
spawns a unit test of class c with 4 template parameters and no constructor arguments
Definition at line 487 of file test_system.hpp.
| #define SPAWN_UNIT_TEST_4T_P | ( | c, | |
| t1, | |||
| t2, | |||
| t3, | |||
| t4, | |||
| ... | |||
| ) | static c<t1,t2,t3,t4> FEAT_CONCAT(unit_test_, __COUNTER__)(__VA_ARGS__) |
spawns a unit test of class c with 4 template parameters and a variadic number of constructor arguments
Definition at line 505 of file test_system.hpp.
| #define SPAWN_UNIT_TEST_5T | ( | c, | |
| t1, | |||
| t2, | |||
| t3, | |||
| t4, | |||
| t5 | |||
| ) | static c<t1,t2,t3,t4,t5> FEAT_CONCAT(unit_test_, __COUNTER__) |
spawns a unit test of class c with 5 template parameters and no constructor arguments
Definition at line 490 of file test_system.hpp.
| #define SPAWN_UNIT_TEST_5T_P | ( | c, | |
| t1, | |||
| t2, | |||
| t3, | |||
| t4, | |||
| t5, | |||
| ... | |||
| ) | static c<t1,t2,t3,t4,t5> FEAT_CONCAT(unit_test_, __COUNTER__)(__VA_ARGS__) |
spawns a unit test of class c with 5 template parameters and a variadic number of constructor arguments
Definition at line 508 of file test_system.hpp.
| #define TEST | ( | pre, | |
| test, | |||
| post | |||
| ) |
runs the given test with pre- and postprocessing
Definition at line 462 of file test_system.hpp.
| #define TEST_CHECK | ( | a | ) |
checks if a is true
Definition at line 400 of file test_system.hpp.
| #define TEST_CHECK_EQUAL | ( | a, | |
| b | |||
| ) |
checks if a == b
Definition at line 374 of file test_system.hpp.
| #define TEST_CHECK_EQUAL_WITHIN_EPS | ( | a, | |
| b, | |||
| eps | |||
| ) |
checks if |a - b| <= epsilon
Definition at line 435 of file test_system.hpp.
| #define TEST_CHECK_IN_RANGE | ( | x, | |
| a, | |||
| b | |||
| ) |
checks if a <= x <= b
Definition at line 386 of file test_system.hpp.
| #define TEST_CHECK_LESS_THAN | ( | a, | |
| b | |||
| ) |
checks if a < b
Definition at line 456 of file test_system.hpp.
| #define TEST_CHECK_MSG | ( | a, | |
| msg | |||
| ) |
checks if a is true; prints msg if a is false
Definition at line 406 of file test_system.hpp.
| #define TEST_CHECK_NOT_EQUAL | ( | a, | |
| b | |||
| ) |
checks if a != b
Definition at line 380 of file test_system.hpp.
| #define TEST_CHECK_RELATIVE | ( | a, | |
| b, | |||
| eps | |||
| ) |
checks if |a - b| <= epsilon*|b|
Definition at line 445 of file test_system.hpp.
| #define TEST_CHECK_STRINGIFY_EQUAL | ( | a, | |
| b | |||
| ) |
checks if stringify(a) == stringify(b)
Definition at line 392 of file test_system.hpp.
| #define TEST_CHECK_THROWS | ( | a, | |
| b | |||
| ) |
checks if a throws an exception of type b
Definition at line 412 of file test_system.hpp.