aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-10-28 18:19:29 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-10-28 18:19:29 -0400
commit2840ac7e948ecb3c7b19ba8f581f829a4a4e1fea (patch)
tree14adcd3aa33c4207b14455707bc247cea29029e6 /test
parent1f1c04cac1d8a87cbb34741d141df646b2da2827 (diff)
big huge changes, so i dont remember everything.
* renaming, e.g. LU ---> FullPivLU * split tests framework: more robust, e.g. dont generate empty tests if a number is skipped * make all remaining tests use that splitting, as needed. * Fix 4x4 inversion (see stable branch) * Transform::inverse() and geo_transform test : adapt to new inverse() API, it was also trying to instantiate inverse() for 3x4 matrices. * CMakeLists: more robust regexp to parse the version number * misc fixes in unit tests
Diffstat (limited to 'test')
-rw-r--r--test/adjoint.cpp16
-rw-r--r--test/array.cpp34
-rw-r--r--test/array_replicate.cpp12
-rw-r--r--test/array_reverse.cpp21
-rw-r--r--test/bandmatrix.cpp2
-rw-r--r--test/basicstuff.cpp22
-rw-r--r--test/cholesky.cpp22
-rw-r--r--test/conservative_resize.cpp32
-rw-r--r--test/cwiseop.cpp12
-rw-r--r--test/determinant.cpp14
-rw-r--r--test/diagonalmatrices.cpp18
-rw-r--r--test/dynalloc.cpp10
-rw-r--r--test/eigensolver_complex.cpp4
-rw-r--r--test/eigensolver_generic.cpp20
-rw-r--r--test/eigensolver_selfadjoint.cpp18
-rw-r--r--test/geo_alignedbox.cpp6
-rw-r--r--test/geo_eulerangles.cpp4
-rw-r--r--test/geo_homogeneous.cpp6
-rw-r--r--test/geo_hyperplane.cpp12
-rw-r--r--test/geo_orthomethods.cpp20
-rw-r--r--test/geo_parametrizedline.cpp8
-rw-r--r--test/geo_quaternion.cpp13
-rw-r--r--test/geo_transformations.cpp30
-rw-r--r--test/householder.cpp12
-rw-r--r--test/inverse.cpp12
-rw-r--r--test/jacobisvd.cpp30
-rw-r--r--test/linearstructure.cpp16
-rw-r--r--test/lu.cpp54
-rw-r--r--test/main.h76
-rw-r--r--test/map.cpp20
-rw-r--r--test/miscmatrices.cpp10
-rw-r--r--test/mixingtypes.cpp10
-rw-r--r--test/nomalloc.cpp6
-rw-r--r--test/packetmath.cpp12
-rw-r--r--test/product_extra.cpp6
-rw-r--r--test/product_large.cpp10
-rw-r--r--test/product_notemporary.cpp4
-rw-r--r--test/product_selfadjoint.cpp16
-rw-r--r--test/product_small.cpp10
-rw-r--r--test/product_symm.cpp8
-rw-r--r--test/product_syrk.cpp4
-rw-r--r--test/product_trmm.cpp4
-rw-r--r--test/product_trmv.cpp12
-rw-r--r--test/product_trsm.cpp4
-rw-r--r--test/qr.cpp30
-rw-r--r--test/qr_colpivoting.cpp38
-rw-r--r--test/qr_fullpivoting.cpp34
-rw-r--r--test/redux.cpp18
-rw-r--r--test/regression.cpp8
-rw-r--r--test/resize.cpp6
-rw-r--r--test/sizeof.cpp16
-rw-r--r--test/smallvectors.cpp6
-rw-r--r--test/sparse_basic.cpp8
-rw-r--r--test/sparse_product.cpp8
-rw-r--r--test/sparse_solvers.cpp10
-rw-r--r--test/sparse_vector.cpp6
-rw-r--r--test/stable_norm.cpp10
-rw-r--r--test/stdvector.cpp34
-rw-r--r--test/submatrices.cpp18
-rw-r--r--test/svd.cpp20
-rw-r--r--test/swap.cpp8
-rw-r--r--test/triangular.cpp14
-rw-r--r--test/umeyama.cpp16
-rw-r--r--test/visitor.cpp20
64 files changed, 534 insertions, 486 deletions
diff --git a/test/adjoint.cpp b/test/adjoint.cpp
index bebf47ac3..344399257 100644
--- a/test/adjoint.cpp
+++ b/test/adjoint.cpp
@@ -108,16 +108,17 @@ template<typename MatrixType> void adjoint(const MatrixType& m)
void test_adjoint()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( adjoint(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( adjoint(Matrix3d()) );
- CALL_SUBTEST( adjoint(Matrix4f()) );
- CALL_SUBTEST( adjoint(MatrixXcf(4, 4)) );
- CALL_SUBTEST( adjoint(MatrixXi(8, 12)) );
- CALL_SUBTEST( adjoint(MatrixXf(21, 21)) );
+ CALL_SUBTEST_1( adjoint(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( adjoint(Matrix3d()) );
+ CALL_SUBTEST_3( adjoint(Matrix4f()) );
+ CALL_SUBTEST_4( adjoint(MatrixXcf(4, 4)) );
+ CALL_SUBTEST_5( adjoint(MatrixXi(8, 12)) );
+ CALL_SUBTEST_6( adjoint(MatrixXf(21, 21)) );
}
// test a large matrix only once
- CALL_SUBTEST( adjoint(Matrix<float, 100, 100>()) );
+ CALL_SUBTEST_7( adjoint(Matrix<float, 100, 100>()) );
+#ifdef EIGEN_TEST_PART_4
{
MatrixXcf a(10,10), b(10,10);
VERIFY_RAISES_ASSERT(a = a.transpose());
@@ -128,5 +129,6 @@ void test_adjoint()
VERIFY_RAISES_ASSERT(a = a.adjoint() + b);
VERIFY_RAISES_ASSERT(a = b + a.adjoint());
}
+#endif
}
diff --git a/test/array.cpp b/test/array.cpp
index a308f7366..a18724d3a 100644
--- a/test/array.cpp
+++ b/test/array.cpp
@@ -146,26 +146,26 @@ template<typename VectorType> void lpNorm(const VectorType& v)
void test_array()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( array(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( array(Matrix2f()) );
- CALL_SUBTEST( array(Matrix4d()) );
- CALL_SUBTEST( array(MatrixXcf(3, 3)) );
- CALL_SUBTEST( array(MatrixXf(8, 12)) );
- CALL_SUBTEST( array(MatrixXi(8, 12)) );
+ CALL_SUBTEST_1( array(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( array(Matrix2f()) );
+ CALL_SUBTEST_3( array(Matrix4d()) );
+ CALL_SUBTEST_4( array(MatrixXcf(3, 3)) );
+ CALL_SUBTEST_5( array(MatrixXf(8, 12)) );
+ CALL_SUBTEST_6( array(MatrixXi(8, 12)) );
}
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( comparisons(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( comparisons(Matrix2f()) );
- CALL_SUBTEST( comparisons(Matrix4d()) );
- CALL_SUBTEST( comparisons(MatrixXf(8, 12)) );
- CALL_SUBTEST( comparisons(MatrixXi(8, 12)) );
+ CALL_SUBTEST_1( comparisons(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( comparisons(Matrix2f()) );
+ CALL_SUBTEST_3( comparisons(Matrix4d()) );
+ CALL_SUBTEST_5( comparisons(MatrixXf(8, 12)) );
+ CALL_SUBTEST_6( comparisons(MatrixXi(8, 12)) );
}
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( lpNorm(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( lpNorm(Vector2f()) );
- CALL_SUBTEST( lpNorm(Vector3d()) );
- CALL_SUBTEST( lpNorm(Vector4f()) );
- CALL_SUBTEST( lpNorm(VectorXf(16)) );
- CALL_SUBTEST( lpNorm(VectorXcd(10)) );
+ CALL_SUBTEST_1( lpNorm(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( lpNorm(Vector2f()) );
+ CALL_SUBTEST_7( lpNorm(Vector3d()) );
+ CALL_SUBTEST_8( lpNorm(Vector4f()) );
+ CALL_SUBTEST_5( lpNorm(VectorXf(16)) );
+ CALL_SUBTEST_4( lpNorm(VectorXcf(10)) );
}
}
diff --git a/test/array_replicate.cpp b/test/array_replicate.cpp
index cd0f65f26..a23ac7c6f 100644
--- a/test/array_replicate.cpp
+++ b/test/array_replicate.cpp
@@ -76,11 +76,11 @@ template<typename MatrixType> void replicate(const MatrixType& m)
void test_array_replicate()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( replicate(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( replicate(Vector2f()) );
- CALL_SUBTEST( replicate(Vector3d()) );
- CALL_SUBTEST( replicate(Vector4f()) );
- CALL_SUBTEST( replicate(VectorXf(16)) );
- CALL_SUBTEST( replicate(VectorXcd(10)) );
+ CALL_SUBTEST_1( replicate(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( replicate(Vector2f()) );
+ CALL_SUBTEST_3( replicate(Vector3d()) );
+ CALL_SUBTEST_4( replicate(Vector4f()) );
+ CALL_SUBTEST_5( replicate(VectorXf(16)) );
+ CALL_SUBTEST_6( replicate(VectorXcd(10)) );
}
}
diff --git a/test/array_reverse.cpp b/test/array_reverse.cpp
index e77842c7d..ccf8dcc87 100644
--- a/test/array_reverse.cpp
+++ b/test/array_reverse.cpp
@@ -163,19 +163,20 @@ template<typename MatrixType> void reverse(const MatrixType& m)
void test_array_reverse()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( reverse(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( reverse(Matrix2f()) );
- CALL_SUBTEST( reverse(Matrix4f()) );
- CALL_SUBTEST( reverse(Matrix4d()) );
- CALL_SUBTEST( reverse(MatrixXcf(3, 3)) );
- CALL_SUBTEST( reverse(MatrixXi(6, 3)) );
- CALL_SUBTEST( reverse(MatrixXcd(20, 20)) );
- CALL_SUBTEST( reverse(Matrix<float, 100, 100>()) );
- CALL_SUBTEST( reverse(Matrix<float,Dynamic,Dynamic,RowMajor>(6,3)) );
+ CALL_SUBTEST_1( reverse(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( reverse(Matrix2f()) );
+ CALL_SUBTEST_3( reverse(Matrix4f()) );
+ CALL_SUBTEST_4( reverse(Matrix4d()) );
+ CALL_SUBTEST_5( reverse(MatrixXcf(3, 3)) );
+ CALL_SUBTEST_6( reverse(MatrixXi(6, 3)) );
+ CALL_SUBTEST_7( reverse(MatrixXcd(20, 20)) );
+ CALL_SUBTEST_8( reverse(Matrix<float, 100, 100>()) );
+ CALL_SUBTEST_9( reverse(Matrix<float,Dynamic,Dynamic,RowMajor>(6,3)) );
}
+#ifdef EIGEN_TEST_PART_3
Vector4f x; x << 1, 2, 3, 4;
Vector4f y; y << 4, 3, 2, 1;
VERIFY(x.reverse()[1] == 3);
VERIFY(x.reverse() == y);
-
+#endif
}
diff --git a/test/bandmatrix.cpp b/test/bandmatrix.cpp
index 2bdc67e28..ecb7304db 100644
--- a/test/bandmatrix.cpp
+++ b/test/bandmatrix.cpp
@@ -79,6 +79,6 @@ void test_bandmatrix()
int cols = ei_random<int>(1,10);
int sups = ei_random<int>(0,cols-1);
int subs = ei_random<int>(0,rows-1);
- CALL_SUBTEST( bandmatrix(BandMatrix<float>(rows,cols,sups,subs)) );
+ CALL_SUBTEST(bandmatrix(BandMatrix<float>(rows,cols,sups,subs)) );
}
}
diff --git a/test/basicstuff.cpp b/test/basicstuff.cpp
index 29df99f9e..4678439d5 100644
--- a/test/basicstuff.cpp
+++ b/test/basicstuff.cpp
@@ -146,17 +146,17 @@ void casting()
void test_basicstuff()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( basicStuff(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( basicStuff(Matrix4d()) );
- CALL_SUBTEST( basicStuff(MatrixXcf(3, 3)) );
- CALL_SUBTEST( basicStuff(MatrixXi(8, 12)) );
- CALL_SUBTEST( basicStuff(MatrixXcd(20, 20)) );
- CALL_SUBTEST( basicStuff(Matrix<float, 100, 100>()) );
- CALL_SUBTEST( basicStuff(Matrix<long double,Dynamic,Dynamic>(10,10)) );
-
- CALL_SUBTEST( basicStuffComplex(MatrixXcf(21, 17)) );
- CALL_SUBTEST( basicStuffComplex(MatrixXcd(2, 3)) );
+ CALL_SUBTEST_1( basicStuff(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( basicStuff(Matrix4d()) );
+ CALL_SUBTEST_3( basicStuff(MatrixXcf(3, 3)) );
+ CALL_SUBTEST_4( basicStuff(MatrixXi(8, 12)) );
+ CALL_SUBTEST_5( basicStuff(MatrixXcd(20, 20)) );
+ CALL_SUBTEST_6( basicStuff(Matrix<float, 100, 100>()) );
+ CALL_SUBTEST_7( basicStuff(Matrix<long double,Dynamic,Dynamic>(10,10)) );
+
+ CALL_SUBTEST_3( basicStuffComplex(MatrixXcf(21, 17)) );
+ CALL_SUBTEST_5( basicStuffComplex(MatrixXcd(2, 3)) );
}
- CALL_SUBTEST(casting());
+ CALL_SUBTEST_2(casting());
}
diff --git a/test/cholesky.cpp b/test/cholesky.cpp
index 526a9f9d0..77d025e59 100644
--- a/test/cholesky.cpp
+++ b/test/cholesky.cpp
@@ -148,17 +148,17 @@ template<typename MatrixType> void cholesky_verify_assert()
void test_cholesky()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( cholesky(Matrix<double,1,1>()) );
- CALL_SUBTEST( cholesky(MatrixXd(1,1)) );
- CALL_SUBTEST( cholesky(Matrix2d()) );
- CALL_SUBTEST( cholesky(Matrix3f()) );
- CALL_SUBTEST( cholesky(Matrix4d()) );
- CALL_SUBTEST( cholesky(MatrixXd(200,200)) );
- CALL_SUBTEST( cholesky(MatrixXcd(100,100)) );
+ CALL_SUBTEST_1( cholesky(Matrix<double,1,1>()) );
+ CALL_SUBTEST_2( cholesky(MatrixXd(1,1)) );
+ CALL_SUBTEST_3( cholesky(Matrix2d()) );
+ CALL_SUBTEST_4( cholesky(Matrix3f()) );
+ CALL_SUBTEST_5( cholesky(Matrix4d()) );
+ CALL_SUBTEST_2( cholesky(MatrixXd(200,200)) );
+ CALL_SUBTEST_6( cholesky(MatrixXcd(100,100)) );
}
- CALL_SUBTEST( cholesky_verify_assert<Matrix3f>() );
- CALL_SUBTEST( cholesky_verify_assert<Matrix3d>() );
- CALL_SUBTEST( cholesky_verify_assert<MatrixXf>() );
- CALL_SUBTEST( cholesky_verify_assert<MatrixXd>() );
+ CALL_SUBTEST_4( cholesky_verify_assert<Matrix3f>() );
+ CALL_SUBTEST_7( cholesky_verify_assert<Matrix3d>() );
+ CALL_SUBTEST_8( cholesky_verify_assert<MatrixXf>() );
+ CALL_SUBTEST_2( cholesky_verify_assert<MatrixXd>() );
}
diff --git a/test/conservative_resize.cpp b/test/conservative_resize.cpp
index b92dd5449..a7b1f78ff 100644
--- a/test/conservative_resize.cpp
+++ b/test/conservative_resize.cpp
@@ -110,20 +110,20 @@ void run_vector_tests()
void test_conservative_resize()
{
- run_matrix_tests<int, Eigen::RowMajor>();
- run_matrix_tests<int, Eigen::ColMajor>();
- run_matrix_tests<float, Eigen::RowMajor>();
- run_matrix_tests<float, Eigen::ColMajor>();
- run_matrix_tests<double, Eigen::RowMajor>();
- run_matrix_tests<double, Eigen::ColMajor>();
- run_matrix_tests<std::complex<float>, Eigen::RowMajor>();
- run_matrix_tests<std::complex<float>, Eigen::ColMajor>();
- run_matrix_tests<std::complex<double>, Eigen::RowMajor>();
- run_matrix_tests<std::complex<double>, Eigen::ColMajor>();
-
- run_vector_tests<int>();
- run_vector_tests<float>();
- run_vector_tests<double>();
- run_vector_tests<std::complex<float> >();
- run_vector_tests<std::complex<double> >();
+ CALL_SUBTEST_1((run_matrix_tests<int, Eigen::RowMajor>()));
+ CALL_SUBTEST_1((run_matrix_tests<int, Eigen::ColMajor>()));
+ CALL_SUBTEST_2((run_matrix_tests<float, Eigen::RowMajor>()));
+ CALL_SUBTEST_2((run_matrix_tests<float, Eigen::ColMajor>()));
+ CALL_SUBTEST_3((run_matrix_tests<double, Eigen::RowMajor>()));
+ CALL_SUBTEST_3((run_matrix_tests<double, Eigen::ColMajor>()));
+ CALL_SUBTEST_4((run_matrix_tests<std::complex<float>, Eigen::RowMajor>()));
+ CALL_SUBTEST_4((run_matrix_tests<std::complex<float>, Eigen::ColMajor>()));
+ CALL_SUBTEST_5((run_matrix_tests<std::complex<double>, Eigen::RowMajor>()));
+ CALL_SUBTEST_6((run_matrix_tests<std::complex<double>, Eigen::ColMajor>()));
+
+ CALL_SUBTEST_1((run_vector_tests<int>()));
+ CALL_SUBTEST_2((run_vector_tests<float>()));
+ CALL_SUBTEST_3((run_vector_tests<double>()));
+ CALL_SUBTEST_4((run_vector_tests<std::complex<float> >()));
+ CALL_SUBTEST_5((run_vector_tests<std::complex<double> >()));
}
diff --git a/test/cwiseop.cpp b/test/cwiseop.cpp
index 10784b0f5..7574bcc4a 100644
--- a/test/cwiseop.cpp
+++ b/test/cwiseop.cpp
@@ -163,11 +163,11 @@ template<typename MatrixType> void cwiseops(const MatrixType& m)
void test_cwiseop()
{
for(int i = 0; i < g_repeat ; i++) {
- CALL_SUBTEST( cwiseops(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( cwiseops(Matrix4d()) );
- CALL_SUBTEST( cwiseops(MatrixXf(3, 3)) );
- CALL_SUBTEST( cwiseops(MatrixXf(22, 22)) );
- CALL_SUBTEST( cwiseops(MatrixXi(8, 12)) );
- CALL_SUBTEST( cwiseops(MatrixXd(20, 20)) );
+ CALL_SUBTEST_1( cwiseops(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( cwiseops(Matrix4d()) );
+ CALL_SUBTEST_3( cwiseops(MatrixXf(3, 3)) );
+ CALL_SUBTEST_4( cwiseops(MatrixXf(22, 22)) );
+ CALL_SUBTEST_5( cwiseops(MatrixXi(8, 12)) );
+ CALL_SUBTEST_6( cwiseops(MatrixXd(20, 20)) );
}
}
diff --git a/test/determinant.cpp b/test/determinant.cpp
index d9de5f6ce..7aa9a870d 100644
--- a/test/determinant.cpp
+++ b/test/determinant.cpp
@@ -65,12 +65,12 @@ template<typename MatrixType> void determinant(const MatrixType& m)
void test_determinant()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( determinant(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( determinant(Matrix<double, 2, 2>()) );
- CALL_SUBTEST( determinant(Matrix<double, 3, 3>()) );
- CALL_SUBTEST( determinant(Matrix<double, 4, 4>()) );
- CALL_SUBTEST( determinant(Matrix<std::complex<double>, 10, 10>()) );
- CALL_SUBTEST( determinant(MatrixXd(20, 20)) );
+ CALL_SUBTEST_1( determinant(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( determinant(Matrix<double, 2, 2>()) );
+ CALL_SUBTEST_3( determinant(Matrix<double, 3, 3>()) );
+ CALL_SUBTEST_4( determinant(Matrix<double, 4, 4>()) );
+ CALL_SUBTEST_5( determinant(Matrix<std::complex<double>, 10, 10>()) );
+ CALL_SUBTEST_6( determinant(MatrixXd(20, 20)) );
}
- CALL_SUBTEST( determinant(MatrixXd(200, 200)) );
+ CALL_SUBTEST_6( determinant(MatrixXd(200, 200)) );
}
diff --git a/test/diagonalmatrices.cpp b/test/diagonalmatrices.cpp
index 9eb0f10f2..c24c66d03 100644
--- a/test/diagonalmatrices.cpp
+++ b/test/diagonalmatrices.cpp
@@ -95,14 +95,14 @@ template<typename MatrixType> void diagonalmatrices(const MatrixType& m)
void test_diagonalmatrices()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( diagonalmatrices(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( diagonalmatrices(Matrix3f()) );
- CALL_SUBTEST( diagonalmatrices(Matrix<double,3,3,RowMajor>()) );
- CALL_SUBTEST( diagonalmatrices(Matrix4d()) );
- CALL_SUBTEST( diagonalmatrices(Matrix<float,4,4,RowMajor>()) );
- CALL_SUBTEST( diagonalmatrices(MatrixXcf(3, 5)) );
- CALL_SUBTEST( diagonalmatrices(MatrixXi(10, 8)) );
- CALL_SUBTEST( diagonalmatrices(Matrix<double,Dynamic,Dynamic,RowMajor>(20, 20)) );
- CALL_SUBTEST( diagonalmatrices(MatrixXf(21, 24)) );
+ CALL_SUBTEST_1( diagonalmatrices(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( diagonalmatrices(Matrix3f()) );
+ CALL_SUBTEST_3( diagonalmatrices(Matrix<double,3,3,RowMajor>()) );
+ CALL_SUBTEST_4( diagonalmatrices(Matrix4d()) );
+ CALL_SUBTEST_5( diagonalmatrices(Matrix<float,4,4,RowMajor>()) );
+ CALL_SUBTEST_6( diagonalmatrices(MatrixXcf(3, 5)) );
+ CALL_SUBTEST_7( diagonalmatrices(MatrixXi(10, 8)) );
+ CALL_SUBTEST_8( diagonalmatrices(Matrix<double,Dynamic,Dynamic,RowMajor>(20, 20)) );
+ CALL_SUBTEST_9( diagonalmatrices(MatrixXf(21, 24)) );
}
}
diff --git a/test/dynalloc.cpp b/test/dynalloc.cpp
index 08fc0369d..e0a9f9f86 100644
--- a/test/dynalloc.cpp
+++ b/test/dynalloc.cpp
@@ -112,11 +112,11 @@ void test_dynalloc()
for (int i=0; i<g_repeat*100; ++i)
{
- CALL_SUBTEST( check_dynaligned<Vector4f>() );
- CALL_SUBTEST( check_dynaligned<Vector2d>() );
- CALL_SUBTEST( check_dynaligned<Matrix4f>() );
- CALL_SUBTEST( check_dynaligned<Vector4d>() );
- CALL_SUBTEST( check_dynaligned<Vector4i>() );
+ CALL_SUBTEST(check_dynaligned<Vector4f>() );
+ CALL_SUBTEST(check_dynaligned<Vector2d>() );
+ CALL_SUBTEST(check_dynaligned<Matrix4f>() );
+ CALL_SUBTEST(check_dynaligned<Vector4d>() );
+ CALL_SUBTEST(check_dynaligned<Vector4i>() );
}
// check static allocation, who knows ?
diff --git a/test/eigensolver_complex.cpp b/test/eigensolver_complex.cpp
index a8e6c709e..86e1b200a 100644
--- a/test/eigensolver_complex.cpp
+++ b/test/eigensolver_complex.cpp
@@ -54,8 +54,8 @@ template<typename MatrixType> void eigensolver(const MatrixType& m)
void test_eigensolver_complex()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST1( eigensolver(Matrix4cf()) );
- CALL_SUBTEST2( eigensolver(MatrixXcd(14,14)) );
+ CALL_SUBTEST_1( eigensolver(Matrix4cf()) );
+ CALL_SUBTEST_2( eigensolver(MatrixXcd(14,14)) );
}
}
diff --git a/test/eigensolver_generic.cpp b/test/eigensolver_generic.cpp
index 6c91ebabe..5dc18f141 100644
--- a/test/eigensolver_generic.cpp
+++ b/test/eigensolver_generic.cpp
@@ -75,18 +75,18 @@ template<typename MatrixType> void eigensolver_verify_assert()
void test_eigensolver_generic()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST1( eigensolver(Matrix4f()) );
- CALL_SUBTEST2( eigensolver(MatrixXd(17,17)) );
+ CALL_SUBTEST_1( eigensolver(Matrix4f()) );
+ CALL_SUBTEST_2( eigensolver(MatrixXd(17,17)) );
// some trivial but implementation-wise tricky cases
- CALL_SUBTEST2( eigensolver(MatrixXd(1,1)) );
- CALL_SUBTEST2( eigensolver(MatrixXd(2,2)) );
- CALL_SUBTEST3( eigensolver(Matrix<double,1,1>()) );
- CALL_SUBTEST4( eigensolver(Matrix2d()) );
+ CALL_SUBTEST_2( eigensolver(MatrixXd(1,1)) );
+ CALL_SUBTEST_2( eigensolver(MatrixXd(2,2)) );
+ CALL_SUBTEST_3( eigensolver(Matrix<double,1,1>()) );
+ CALL_SUBTEST_4( eigensolver(Matrix2d()) );
}
- CALL_SUBTEST1( eigensolver_verify_assert<Matrix4f>() );
- CALL_SUBTEST2( eigensolver_verify_assert<MatrixXd>() );
- CALL_SUBTEST4( eigensolver_verify_assert<Matrix2d>() );
- CALL_SUBTEST5( eigensolver_verify_assert<MatrixXf>() );
+ CALL_SUBTEST_1( eigensolver_verify_assert<Matrix4f>() );
+ CALL_SUBTEST_2( eigensolver_verify_assert<MatrixXd>() );
+ CALL_SUBTEST_4( eigensolver_verify_assert<Matrix2d>() );
+ CALL_SUBTEST_5( eigensolver_verify_assert<MatrixXf>() );
}
diff --git a/test/eigensolver_selfadjoint.cpp b/test/eigensolver_selfadjoint.cpp
index 27a5f2246..632c1d2e7 100644
--- a/test/eigensolver_selfadjoint.cpp
+++ b/test/eigensolver_selfadjoint.cpp
@@ -117,17 +117,17 @@ void test_eigensolver_selfadjoint()
{
for(int i = 0; i < g_repeat; i++) {
// very important to test a 3x3 matrix since we provide a special path for it
- CALL_SUBTEST1( selfadjointeigensolver(Matrix3f()) );
- CALL_SUBTEST2( selfadjointeigensolver(Matrix4d()) );
- CALL_SUBTEST3( selfadjointeigensolver(MatrixXf(10,10)) );
- CALL_SUBTEST4( selfadjointeigensolver(MatrixXd(19,19)) );
- CALL_SUBTEST5( selfadjointeigensolver(MatrixXcd(17,17)) );
+ CALL_SUBTEST_1( selfadjointeigensolver(Matrix3f()) );
+ CALL_SUBTEST_2( selfadjointeigensolver(Matrix4d()) );
+ CALL_SUBTEST_3( selfadjointeigensolver(MatrixXf(10,10)) );
+ CALL_SUBTEST_4( selfadjointeigensolver(MatrixXd(19,19)) );
+ CALL_SUBTEST_5( selfadjointeigensolver(MatrixXcd(17,17)) );
// some trivial but implementation-wise tricky cases
- CALL_SUBTEST4( selfadjointeigensolver(MatrixXd(1,1)) );
- CALL_SUBTEST4( selfadjointeigensolver(MatrixXd(2,2)) );
- CALL_SUBTEST6( selfadjointeigensolver(Matrix<double,1,1>()) );
- CALL_SUBTEST7( selfadjointeigensolver(Matrix<double,2,2>()) );
+ CALL_SUBTEST_4( selfadjointeigensolver(MatrixXd(1,1)) );
+ CALL_SUBTEST_4( selfadjointeigensolver(MatrixXd(2,2)) );
+ CALL_SUBTEST_6( selfadjointeigensolver(Matrix<double,1,1>()) );
+ CALL_SUBTEST_7( selfadjointeigensolver(Matrix<double,2,2>()) );
}
}
diff --git a/test/geo_alignedbox.cpp b/test/geo_alignedbox.cpp
index 07b3e59e6..d496578da 100644
--- a/test/geo_alignedbox.cpp
+++ b/test/geo_alignedbox.cpp
@@ -75,8 +75,8 @@ template<typename BoxType> void alignedbox(const BoxType& _box)
void test_geo_alignedbox()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( alignedbox(AlignedBox<float,2>()) );
- CALL_SUBTEST( alignedbox(AlignedBox<float,3>()) );
- CALL_SUBTEST( alignedbox(AlignedBox<double,4>()) );
+ CALL_SUBTEST_1( alignedbox(AlignedBox<float,2>()) );
+ CALL_SUBTEST_2( alignedbox(AlignedBox<float,3>()) );
+ CALL_SUBTEST_3( alignedbox(AlignedBox<double,4>()) );
}
}
diff --git a/test/geo_eulerangles.cpp b/test/geo_eulerangles.cpp
index f11c8e8ef..98cdf6a86 100644
--- a/test/geo_eulerangles.cpp
+++ b/test/geo_eulerangles.cpp
@@ -64,7 +64,7 @@ template<typename Scalar> void eulerangles(void)
void test_geo_eulerangles()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( eulerangles<float>() );
- CALL_SUBTEST( eulerangles<double>() );
+ CALL_SUBTEST_1( eulerangles<float>() );
+ CALL_SUBTEST_2( eulerangles<double>() );
}
}
diff --git a/test/geo_homogeneous.cpp b/test/geo_homogeneous.cpp
index 4b66e488c..48d8cbcdf 100644
--- a/test/geo_homogeneous.cpp
+++ b/test/geo_homogeneous.cpp
@@ -104,8 +104,8 @@ template<typename Scalar,int Size> void homogeneous(void)
void test_geo_homogeneous()
{
for(int i = 0; i < g_repeat; i++) {
-// CALL_SUBTEST(( homogeneous<float,1>() ));
- CALL_SUBTEST(( homogeneous<double,3>() ));
-// CALL_SUBTEST(( homogeneous<double,8>() ));
+ CALL_SUBTEST_1(( homogeneous<float,1>() ));
+ CALL_SUBTEST_2(( homogeneous<double,3>() ));
+ CALL_SUBTEST_3(( homogeneous<double,8>() ));
}
}
diff --git a/test/geo_hyperplane.cpp b/test/geo_hyperplane.cpp
index f8281a16b..f1d3b016f 100644
--- a/test/geo_hyperplane.cpp
+++ b/test/geo_hyperplane.cpp
@@ -130,11 +130,11 @@ template<typename Scalar> void lines()
void test_geo_hyperplane()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( hyperplane(Hyperplane<float,2>()) );
- CALL_SUBTEST( hyperplane(Hyperplane<float,3>()) );
- CALL_SUBTEST( hyperplane(Hyperplane<double,4>()) );
- CALL_SUBTEST( hyperplane(Hyperplane<std::complex<double>,5>()) );
- CALL_SUBTEST( lines<float>() );
- CALL_SUBTEST( lines<double>() );
+ CALL_SUBTEST_1( hyperplane(Hyperplane<float,2>()) );
+ CALL_SUBTEST_2( hyperplane(Hyperplane<float,3>()) );
+ CALL_SUBTEST_3( hyperplane(Hyperplane<double,4>()) );
+ CALL_SUBTEST_4( hyperplane(Hyperplane<std::complex<double>,5>()) );
+ CALL_SUBTEST_1( lines<float>() );
+ CALL_SUBTEST_2( lines<double>() );
}
}
diff --git a/test/geo_orthomethods.cpp b/test/geo_orthomethods.cpp
index 540a63b82..54a6febab 100644
--- a/test/geo_orthomethods.cpp
+++ b/test/geo_orthomethods.cpp
@@ -113,15 +113,15 @@ template<typename Scalar, int Size> void orthomethods(int size=Size)
void test_geo_orthomethods()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( orthomethods_3<float>() );
- CALL_SUBTEST( orthomethods_3<double>() );
- CALL_SUBTEST( (orthomethods<float,2>()) );
- CALL_SUBTEST( (orthomethods<double,2>()) );
- CALL_SUBTEST( (orthomethods<float,3>()) );
- CALL_SUBTEST( (orthomethods<double,3>()) );
- CALL_SUBTEST( (orthomethods<float,7>()) );
- CALL_SUBTEST( (orthomethods<std::complex<double>,8>()) );
- CALL_SUBTEST( (orthomethods<float,Dynamic>(36)) );
- CALL_SUBTEST( (orthomethods<double,Dynamic>(35)) );
+ CALL_SUBTEST_1( orthomethods_3<float>() );
+ CALL_SUBTEST_2( orthomethods_3<double>() );
+ CALL_SUBTEST_1( (orthomethods<float,2>()) );
+ CALL_SUBTEST_2( (orthomethods<double,2>()) );
+ CALL_SUBTEST_1( (orthomethods<float,3>()) );
+ CALL_SUBTEST_2( (orthomethods<double,3>()) );
+ CALL_SUBTEST_3( (orthomethods<float,7>()) );
+ CALL_SUBTEST_4( (orthomethods<std::complex<double>,8>()) );
+ CALL_SUBTEST_5( (orthomethods<float,Dynamic>(36)) );
+ CALL_SUBTEST_6( (orthomethods<double,Dynamic>(35)) );
}
}
diff --git a/test/geo_parametrizedline.cpp b/test/geo_parametrizedline.cpp
index c90d59d3e..137324a98 100644
--- a/test/geo_parametrizedline.cpp
+++ b/test/geo_parametrizedline.cpp
@@ -69,9 +69,9 @@ template<typename LineType> void parametrizedline(const LineType& _line)
void test_geo_parametrizedline()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( parametrizedline(ParametrizedLine<float,2>()) );
- CALL_SUBTEST( parametrizedline(ParametrizedLine<float,3>()) );
- CALL_SUBTEST( parametrizedline(ParametrizedLine<double,4>()) );
- CALL_SUBTEST( parametrizedline(ParametrizedLine<std::complex<double>,5>()) );
+ CALL_SUBTEST_1( parametrizedline(ParametrizedLine<float,2>()) );
+ CALL_SUBTEST_2( parametrizedline(ParametrizedLine<float,3>()) );
+ CALL_SUBTEST_3( parametrizedline(ParametrizedLine<double,4>()) );
+ CALL_SUBTEST_4( parametrizedline(ParametrizedLine<std::complex<double>,5>()) );
}
}
diff --git a/test/geo_quaternion.cpp b/test/geo_quaternion.cpp
index 762743fba..7dbf890f4 100644
--- a/test/geo_quaternion.cpp
+++ b/test/geo_quaternion.cpp
@@ -92,9 +92,12 @@ template<typename Scalar> void quaternion(void)
VERIFY_IS_APPROX( v2.normalized(),(q2.setFromTwoVectors(v1, v2)*v1).normalized());
VERIFY_IS_APPROX( v1.normalized(),(q2.setFromTwoVectors(v1, v1)*v1).normalized());
VERIFY_IS_APPROX(-v1.normalized(),(q2.setFromTwoVectors(v1,-v1)*v1).normalized());
- v3 = v1.cwise()+eps;
- VERIFY_IS_APPROX( v3.normalized(),(q2.setFromTwoVectors(v1, v3)*v1).normalized());
- VERIFY_IS_APPROX(-v3.normalized(),(q2.setFromTwoVectors(v1,-v3)*v1).normalized());
+ if (ei_is_same_type<Scalar,double>::ret)
+ {
+ v3 = v1.cwise()+eps;
+ VERIFY_IS_APPROX( v3.normalized(),(q2.setFromTwoVectors(v1, v3)*v1).normalized());
+ VERIFY_IS_APPROX(-v3.normalized(),(q2.setFromTwoVectors(v1,-v3)*v1).normalized());
+ }
// inverse and conjugate
VERIFY_IS_APPROX(q1 * (q1.inverse() * v1), v1);
@@ -110,7 +113,7 @@ template<typename Scalar> void quaternion(void)
void test_geo_quaternion()
{
for(int i = 0; i < g_repeat; i++) {
-// CALL_SUBTEST( quaternion<float>() );
- CALL_SUBTEST( quaternion<double>() );
+ CALL_SUBTEST_1( quaternion<float>() );
+ CALL_SUBTEST_2( quaternion<double>() );
}
}
diff --git a/test/geo_transformations.cpp b/test/geo_transformations.cpp
index 23b297314..f1d068b83 100644
--- a/test/geo_transformations.cpp
+++ b/test/geo_transformations.cpp
@@ -298,16 +298,19 @@ template<typename Scalar, int Mode> void transformations(void)
VERIFY_IS_APPROX((t0 * v1).template start<3>(), AlignedScaling3(v0) * v1);
// test transform inversion
- if(Mode!=AffineCompact)
- {
- t0.setIdentity();
- t0.translate(v0);
- t0.linear().setRandom();
- VERIFY_IS_APPROX(t0.inverse(Affine).matrix(), t0.matrix().inverse());
- t0.setIdentity();
- t0.translate(v0).rotate(q1);
- VERIFY_IS_APPROX(t0.inverse(Isometry).matrix(), t0.matrix().inverse());
- }
+ t0.setIdentity();
+ t0.translate(v0);
+ t0.linear().setRandom();
+ Matrix4 t044 = Matrix4::Zero();
+ t044(3,3) = 1;
+ t044.block(0,0,t0.matrix().rows(),4) = t0.matrix();
+ VERIFY_IS_APPROX(t0.inverse(Affine).matrix(), t044.inverse().block(0,0,t0.matrix().rows(),4));
+ t0.setIdentity();
+ t0.translate(v0).rotate(q1);
+ t044 = Matrix4::Zero();
+ t044(3,3) = 1;
+ t044.block(0,0,t0.matrix().rows(),4) = t0.matrix();
+ VERIFY_IS_APPROX(t0.inverse(Isometry).matrix(), t044.inverse().block(0,0,t0.matrix().rows(),4));
// test extract rotation and aligned scaling
// t0.setIdentity();
@@ -354,9 +357,8 @@ template<typename Scalar, int Mode> void transformations(void)
void test_geo_transformations()
{
for(int i = 0; i < g_repeat; i++) {
-// CALL_SUBTEST( transformations<float>() );
- CALL_SUBTEST(( transformations<double,Affine>() ));
- CALL_SUBTEST(( transformations<double,AffineCompact>() ));
- CALL_SUBTEST(( transformations<double,Projective>() ));
+ CALL_SUBTEST_1(( transformations<double,Affine>() ));
+ CALL_SUBTEST_2(( transformations<float,AffineCompact>() ));
+ CALL_SUBTEST_3(( transformations<double,Projective>() ));
}
}
diff --git a/test/householder.cpp b/test/householder.cpp
index b27279479..c9b07622d 100644
--- a/test/householder.cpp
+++ b/test/householder.cpp
@@ -92,12 +92,12 @@ template<typename MatrixType> void householder(const MatrixType& m)
void test_householder()
{
for(int i = 0; i < 2*g_repeat; i++) {
- CALL_SUBTEST( householder(Matrix<double,2,2>()) );
- CALL_SUBTEST( householder(Matrix<float,2,3>()) );
- CALL_SUBTEST( householder(Matrix<double,3,5>()) );
- CALL_SUBTEST( householder(Matrix<float,4,4>()) );
- CALL_SUBTEST( householder(MatrixXd(10,12)) );
- CALL_SUBTEST( householder(MatrixXcf(16,17)) );
+ CALL_SUBTEST_1( householder(Matrix<double,2,2>()) );
+ CALL_SUBTEST_2( householder(Matrix<float,2,3>()) );
+ CALL_SUBTEST_3( householder(Matrix<double,3,5>()) );
+ CALL_SUBTEST_4( householder(Matrix<float,4,4>()) );
+ CALL_SUBTEST_5( householder(MatrixXd(10,12)) );
+ CALL_SUBTEST_6( householder(MatrixXcf(16,17)) );
}
}
diff --git a/test/inverse.cpp b/test/inverse.cpp
index 269678fd4..3ed61d356 100644
--- a/test/inverse.cpp
+++ b/test/inverse.cpp
@@ -95,14 +95,14 @@ void test_inverse()
{
int s;
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST1( inverse(Matrix<double,1,1>()) );
- CALL_SUBTEST2( inverse(Matrix2d()) );
- CALL_SUBTEST3( inverse(Matrix3f()) );
- CALL_SUBTEST4( inverse(Matrix4f()) );
+ CALL_SUBTEST_1( inverse(Matrix<double,1,1>()) );
+ CALL_SUBTEST_2( inverse(Matrix2d()) );
+ CALL_SUBTEST_3( inverse(Matrix3f()) );
+ CALL_SUBTEST_4( inverse(Matrix4f()) );
s = ei_random<int>(50,320);
- CALL_SUBTEST5( inverse(MatrixXf(s,s)) );
+ CALL_SUBTEST_5( inverse(MatrixXf(s,s)) );
s = ei_random<int>(25,100);
- CALL_SUBTEST6( inverse(MatrixXcd(s,s)) );
+ CALL_SUBTEST_6( inverse(MatrixXcd(s,s)) );
}
#ifdef EIGEN_TEST_PART_4
diff --git a/test/jacobisvd.cpp b/test/jacobisvd.cpp
index 2e3f089a0..f3a143e3c 100644
--- a/test/jacobisvd.cpp
+++ b/test/jacobisvd.cpp
@@ -80,27 +80,27 @@ void test_jacobisvd()
Matrix2cd m;
m << 0, 1,
0, 1;
- CALL_SUBTEST(( svd<Matrix2cd,0>(m, false) ));
+ CALL_SUBTEST_1(( svd<Matrix2cd,0>(m, false) ));
m << 1, 0,
1, 0;
- CALL_SUBTEST(( svd<Matrix2cd,0>(m, false) ));
+ CALL_SUBTEST_1(( svd<Matrix2cd,0>(m, false) ));
Matrix2d n;
n << 1, 1,
1, -1;
- CALL_SUBTEST(( svd<Matrix2d,0>(n, false) ));
- CALL_SUBTEST(( svd<Matrix3f,0>() ));
- CALL_SUBTEST(( svd<Matrix4d,Square>() ));
- CALL_SUBTEST(( svd<Matrix<float,3,5> , AtLeastAsManyColsAsRows>() ));
- CALL_SUBTEST(( svd<Matrix<double,Dynamic,2> , AtLeastAsManyRowsAsCols>(Matrix<double,Dynamic,2>(10,2)) ));
+ CALL_SUBTEST_2(( svd<Matrix2d,0>(n, false) ));
+ CALL_SUBTEST_3(( svd<Matrix3f,0>() ));
+ CALL_SUBTEST_4(( svd<Matrix4d,Square>() ));
+ CALL_SUBTEST_5(( svd<Matrix<float,3,5> , AtLeastAsManyColsAsRows>() ));
+ CALL_SUBTEST_6(( svd<Matrix<double,Dynamic,2> , AtLeastAsManyRowsAsCols>(Matrix<double,Dynamic,2>(10,2)) ));
- CALL_SUBTEST(( svd<MatrixXf,Square>(MatrixXf(50,50)) ));
- CALL_SUBTEST(( svd<MatrixXcd,AtLeastAsManyRowsAsCols>(MatrixXcd(14,7)) ));
+ CALL_SUBTEST_7(( svd<MatrixXf,Square>(MatrixXf(50,50)) ));
+ CALL_SUBTEST_8(( svd<MatrixXcd,AtLeastAsManyRowsAsCols>(MatrixXcd(14,7)) ));
}
- CALL_SUBTEST(( svd<MatrixXf,0>(MatrixXf(300,200)) ));
- CALL_SUBTEST(( svd<MatrixXcd,AtLeastAsManyColsAsRows>(MatrixXcd(100,150)) ));
+ CALL_SUBTEST_9(( svd<MatrixXf,0>(MatrixXf(300,200)) ));
+ CALL_SUBTEST_10(( svd<MatrixXcd,AtLeastAsManyColsAsRows>(MatrixXcd(100,150)) ));
- CALL_SUBTEST(( svd_verify_assert<Matrix3f>() ));
- CALL_SUBTEST(( svd_verify_assert<Matrix3d>() ));
- CALL_SUBTEST(( svd_verify_assert<MatrixXf>() ));
- CALL_SUBTEST(( svd_verify_assert<MatrixXd>() ));
+ CALL_SUBTEST_3(( svd_verify_assert<Matrix3f>() ));
+ CALL_SUBTEST_3(( svd_verify_assert<Matrix3d>() ));
+ CALL_SUBTEST_9(( svd_verify_assert<MatrixXf>() ));
+ CALL_SUBTEST_11(( svd_verify_assert<MatrixXd>() ));
}
diff --git a/test/linearstructure.cpp b/test/linearstructure.cpp
index 8827c40d1..f2ffc33bd 100644
--- a/test/linearstructure.cpp
+++ b/test/linearstructure.cpp
@@ -87,13 +87,13 @@ template<typename MatrixType> void linearStructure(const MatrixType& m)
void test_linearstructure()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( linearStructure(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( linearStructure(Matrix2f()) );
- CALL_SUBTEST( linearStructure(Vector3d()) );
- CALL_SUBTEST( linearStructure(Matrix4d()) );
- CALL_SUBTEST( linearStructure(MatrixXcf(3, 3)) );
- CALL_SUBTEST( linearStructure(MatrixXf(8, 12)) );
- CALL_SUBTEST( linearStructure(MatrixXi(8, 12)) );
- CALL_SUBTEST( linearStructure(MatrixXcd(20, 20)) );
+ CALL_SUBTEST_1( linearStructure(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( linearStructure(Matrix2f()) );
+ CALL_SUBTEST_3( linearStructure(Vector3d()) );
+ CALL_SUBTEST_4( linearStructure(Matrix4d()) );
+ CALL_SUBTEST_5( linearStructure(MatrixXcf(3, 3)) );
+ CALL_SUBTEST_6( linearStructure(MatrixXf(8, 12)) );
+ CALL_SUBTEST_7( linearStructure(MatrixXi(8, 12)) );
+ CALL_SUBTEST_8( linearStructure(MatrixXcd(20, 20)) );
}
}
diff --git a/test/lu.cpp b/test/lu.cpp
index 1813172cd..b7214ae12 100644
--- a/test/lu.cpp
+++ b/test/lu.cpp
@@ -58,13 +58,13 @@ template<typename MatrixType> void lu_non_invertible()
int rank = ei_random<int>(1, std::min(rows, cols)-1);
// The image of the zero matrix should consist of a single (zero) column vector
- VERIFY((MatrixType::Zero(rows,cols).lu().image(MatrixType::Zero(rows,cols)).cols() == 1));
+ VERIFY((MatrixType::Zero(rows,cols).fullPivLu().image(MatrixType::Zero(rows,cols)).cols() == 1));
MatrixType m1(rows, cols), m3(rows, cols2);
CMatrixType m2(cols, cols2);
createRandomMatrixOfRank(rank, rows, cols, m1);
- LU<MatrixType> lu(m1);
+ FullPivLU<MatrixType> lu(m1);
KernelMatrixType m1kernel = lu.kernel();
ImageMatrixType m1image = lu.image(m1);
@@ -75,20 +75,16 @@ template<typename MatrixType> void lu_non_invertible()
VERIFY(!lu.isInvertible());
VERIFY(!lu.isSurjective());
VERIFY((m1 * m1kernel).isMuchSmallerThan(m1));
- VERIFY(m1image.lu().rank() == rank);
+ VERIFY(m1image.fullPivLu().rank() == rank);
DynamicMatrixType sidebyside(m1.rows(), m1.cols() + m1image.cols());
sidebyside << m1, m1image;
- VERIFY(sidebyside.lu().rank() == rank);
+ VERIFY(sidebyside.fullPivLu().rank() == rank);
m2 = CMatrixType::Random(cols,cols2);
m3 = m1*m2;
m2 = CMatrixType::Random(cols,cols2);
// test that the code, which does resize(), may be applied to an xpr
m2.block(0,0,m2.rows(),m2.cols()) = lu.solve(m3);
VERIFY_IS_APPROX(m3, m1*m2);
-
- CMatrixType m4(cols, cols), m5(cols, cols);
- createRandomMatrixOfRank(cols/2, cols, cols, m4);
- VERIFY(!m4.computeInverseWithCheck(&m5));
}
template<typename MatrixType> void lu_invertible()
@@ -109,14 +105,14 @@ template<typename MatrixType> void lu_invertible()
m1 += a * a.adjoint();
}
- LU<MatrixType> lu(m1);
+ FullPivLU<MatrixType> lu(m1);
VERIFY(0 == lu.dimensionOfKernel());
VERIFY(lu.kernel().cols() == 1); // the kernel() should consist of a single (zero) column vector
VERIFY(size == lu.rank());
VERIFY(lu.isInjective());
VERIFY(lu.isSurjective());
VERIFY(lu.isInvertible());
- VERIFY(lu.image(m1).lu().isInvertible());
+ VERIFY(lu.image(m1).fullPivLu().isInvertible());
m3 = MatrixType::Random(size,size);
m2 = lu.solve(m3);
VERIFY_IS_APPROX(m3, m1*m2);
@@ -127,7 +123,7 @@ template<typename MatrixType> void lu_verify_assert()
{
MatrixType tmp;
- LU<MatrixType> lu;
+ FullPivLU<MatrixType> lu;
VERIFY_RAISES_ASSERT(lu.matrixLU())
VERIFY_RAISES_ASSERT(lu.permutationP())
VERIFY_RAISES_ASSERT(lu.permutationQ())
@@ -142,10 +138,10 @@ template<typename MatrixType> void lu_verify_assert()
VERIFY_RAISES_ASSERT(lu.isInvertible())
VERIFY_RAISES_ASSERT(lu.inverse())
- PartialLU<MatrixType> plu;
+ PartialPivLU<MatrixType> plu;
VERIFY_RAISES_ASSERT(plu.matrixLU())
VERIFY_RAISES_ASSERT(plu.permutationP())
- VERIFY_RAISES_ASSERT(plu.solve(tmp,&tmp))
+ VERIFY_RAISES_ASSERT(plu.solve(tmp))
VERIFY_RAISES_ASSERT(plu.determinant())
VERIFY_RAISES_ASSERT(plu.inverse())
}
@@ -153,26 +149,26 @@ template<typename MatrixType> void lu_verify_assert()
void test_lu()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST1( lu_non_invertible<Matrix3f>() );
- CALL_SUBTEST1( lu_verify_assert<Matrix3f>() );
+ CALL_SUBTEST_1( lu_non_invertible<Matrix3f>() );
+ CALL_SUBTEST_1( lu_verify_assert<Matrix3f>() );
- CALL_SUBTEST2( (lu_non_invertible<Matrix<double, 4, 6> >()) );
- CALL_SUBTEST2( (lu_verify_assert<Matrix<double, 4, 6> >()) );
+ CALL_SUBTEST_2( (lu_non_invertible<Matrix<double, 4, 6> >()) );
+ CALL_SUBTEST_2( (lu_verify_assert<Matrix<double, 4, 6> >()) );
- CALL_SUBTEST3( lu_non_invertible<MatrixXf>() );
- CALL_SUBTEST3( lu_invertible<MatrixXf>() );
- CALL_SUBTEST3( lu_verify_assert<MatrixXf>() );
+ CALL_SUBTEST_3( lu_non_invertible<MatrixXf>() );
+ CALL_SUBTEST_3( lu_invertible<MatrixXf>() );
+ CALL_SUBTEST_3( lu_verify_assert<MatrixXf>() );
- CALL_SUBTEST4( lu_non_invertible<MatrixXd>() );
- CALL_SUBTEST4( lu_invertible<MatrixXd>() );
- CALL_SUBTEST4( lu_verify_assert<MatrixXd>() );
+ CALL_SUBTEST_4( lu_non_invertible<MatrixXd>() );
+ CALL_SUBTEST_4( lu_invertible<MatrixXd>() );
+ CALL_SUBTEST_4( lu_verify_assert<MatrixXd>() );
- CALL_SUBTEST5( lu_non_invertible<MatrixXcf>() );
- CALL_SUBTEST5( lu_invertible<MatrixXcf>() );
- CALL_SUBTEST5( lu_verify_assert<MatrixXcf>() );
+ CALL_SUBTEST_5( lu_non_invertible<MatrixXcf>() );
+ CALL_SUBTEST_5( lu_invertible<MatrixXcf>() );
+ CALL_SUBTEST_5( lu_verify_assert<MatrixXcf>() );
- CALL_SUBTEST6( lu_non_invertible<MatrixXcd>() );
- CALL_SUBTEST6( lu_invertible<MatrixXcd>() );
- CALL_SUBTEST6( lu_verify_assert<MatrixXcd>() );
+ CALL_SUBTEST_6( lu_non_invertible<MatrixXcd>() );
+ CALL_SUBTEST_6( lu_invertible<MatrixXcd>() );
+ CALL_SUBTEST_6( lu_verify_assert<MatrixXcd>() );
}
}
diff --git a/test/main.h b/test/main.h
index 15ae3d645..0b9b0bc4c 100644
--- a/test/main.h
+++ b/test/main.h
@@ -171,63 +171,99 @@ namespace Eigen
} while (0)
#ifdef EIGEN_TEST_PART_1
-#define CALL_SUBTEST1(FUNC) CALL_SUBTEST(FUNC)
+#define CALL_SUBTEST_1(FUNC) CALL_SUBTEST(FUNC)
#else
-#define CALL_SUBTEST1(FUNC)
+#define CALL_SUBTEST_1(FUNC)
#endif
#ifdef EIGEN_TEST_PART_2
-#define CALL_SUBTEST2(FUNC) CALL_SUBTEST(FUNC)
+#define CALL_SUBTEST_2(FUNC) CALL_SUBTEST(FUNC)
#else
-#define CALL_SUBTEST2(FUNC)
+#define CALL_SUBTEST_2(FUNC)
#endif
#ifdef EIGEN_TEST_PART_3
-#define CALL_SUBTEST3(FUNC) CALL_SUBTEST(FUNC)
+#define CALL_SUBTEST_3(FUNC) CALL_SUBTEST(FUNC)
#else
-#define CALL_SUBTEST3(FUNC)
+#define CALL_SUBTEST_3(FUNC)
#endif
#ifdef EIGEN_TEST_PART_4
-#define CALL_SUBTEST4(FUNC) CALL_SUBTEST(FUNC)
+#define CALL_SUBTEST_4(FUNC) CALL_SUBTEST(FUNC)
#else
-#define CALL_SUBTEST4(FUNC)
+#define CALL_SUBTEST_4(FUNC)
#endif
#ifdef EIGEN_TEST_PART_5
-#define CALL_SUBTEST5(FUNC) CALL_SUBTEST(FUNC)
+#define CALL_SUBTEST_5(FUNC) CALL_SUBTEST(FUNC)
#else
-#define CALL_SUBTEST5(FUNC)
+#define CALL_SUBTEST_5(FUNC)
#endif
#ifdef EIGEN_TEST_PART_6
-#define CALL_SUBTEST6(FUNC) CALL_SUBTEST(FUNC)
+#define CALL_SUBTEST_6(FUNC) CALL_SUBTEST(FUNC)
#else
-#define CALL_SUBTEST6(FUNC)
+#define CALL_SUBTEST_6(FUNC)
#endif
#ifdef EIGEN_TEST_PART_7
-#define CALL_SUBTEST7(FUNC) CALL_SUBTEST(FUNC)
+#define CALL_SUBTEST_7(FUNC) CALL_SUBTEST(FUNC)
#else
-#define CALL_SUBTEST7(FUNC)
+#define CALL_SUBTEST_7(FUNC)
#endif
#ifdef EIGEN_TEST_PART_8
-#define CALL_SUBTEST8(FUNC) CALL_SUBTEST(FUNC)
+#define CALL_SUBTEST_8(FUNC) CALL_SUBTEST(FUNC)
#else
-#define CALL_SUBTEST8(FUNC)
+#define CALL_SUBTEST_8(FUNC)
#endif
#ifdef EIGEN_TEST_PART_9
-#define CALL_SUBTEST9(FUNC) CALL_SUBTEST(FUNC)
+#define CALL_SUBTEST_9(FUNC) CALL_SUBTEST(FUNC)
#else
-#define CALL_SUBTEST9(FUNC)
+#define CALL_SUBTEST_9(FUNC)
#endif
#ifdef EIGEN_TEST_PART_10
-#define CALL_SUBTEST10(FUNC) CALL_SUBTEST(FUNC)
+#define CALL_SUBTEST_10(FUNC) CALL_SUBTEST(FUNC)
#else
-#define CALL_SUBTEST10(FUNC)
+#define CALL_SUBTEST_10(FUNC)
+#endif
+
+#ifdef EIGEN_TEST_PART_11
+#define CALL_SUBTEST_11(FUNC) CALL_SUBTEST(FUNC)
+#else
+#define CALL_SUBTEST_11(FUNC)
+#endif
+
+#ifdef EIGEN_TEST_PART_12
+#define CALL_SUBTEST_12(FUNC) CALL_SUBTEST(FUNC)
+#else
+#define CALL_SUBTEST_12(FUNC)
+#endif
+
+#ifdef EIGEN_TEST_PART_13
+#define CALL_SUBTEST_13(FUNC) CALL_SUBTEST(FUNC)
+#else
+#define CALL_SUBTEST_13(FUNC)
+#endif
+
+#ifdef EIGEN_TEST_PART_14
+#define CALL_SUBTEST_14(FUNC) CALL_SUBTEST(FUNC)
+#else
+#define CALL_SUBTEST_14(FUNC)
+#endif
+
+#ifdef EIGEN_TEST_PART_15
+#define CALL_SUBTEST_15(FUNC) CALL_SUBTEST(FUNC)
+#else
+#define CALL_SUBTEST_15(FUNC)
+#endif
+
+#ifdef EIGEN_TEST_PART_16
+#define CALL_SUBTEST_16(FUNC) CALL_SUBTEST(FUNC)
+#else
+#define CALL_SUBTEST_16(FUNC)
#endif
namespace Eigen {
diff --git a/test/map.cpp b/test/map.cpp
index 62e727304..5c0ec3137 100644
--- a/test/map.cpp
+++ b/test/map.cpp
@@ -80,16 +80,16 @@ template<typename VectorType> void map_static_methods(const VectorType& m)
void test_map()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( map_class(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( map_class(Vector4d()) );
- CALL_SUBTEST( map_class(RowVector4f()) );
- CALL_SUBTEST( map_class(VectorXcf(8)) );
- CALL_SUBTEST( map_class(VectorXi(12)) );
+ CALL_SUBTEST_1( map_class(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( map_class(Vector4d()) );
+ CALL_SUBTEST_3( map_class(RowVector4f()) );
+ CALL_SUBTEST_4( map_class(VectorXcf(8)) );
+ CALL_SUBTEST_5( map_class(VectorXi(12)) );
- CALL_SUBTEST( map_static_methods(Matrix<double, 1, 1>()) );
- CALL_SUBTEST( map_static_methods(Vector3f()) );
- CALL_SUBTEST( map_static_methods(RowVector3d()) );
- CALL_SUBTEST( map_static_methods(VectorXcd(8)) );
- CALL_SUBTEST( map_static_methods(VectorXf(12)) );
+ CALL_SUBTEST_6( map_static_methods(Matrix<double, 1, 1>()) );
+ CALL_SUBTEST_7( map_static_methods(Vector3f()) );
+ CALL_SUBTEST_8( map_static_methods(RowVector3d()) );
+ CALL_SUBTEST_9( map_static_methods(VectorXcd(8)) );
+ CALL_SUBTEST_10( map_static_methods(VectorXf(12)) );
}
}
diff --git a/test/miscmatrices.cpp b/test/miscmatrices.cpp
index bf885e252..0adccf5ce 100644
--- a/test/miscmatrices.cpp
+++ b/test/miscmatrices.cpp
@@ -54,10 +54,10 @@ template<typename MatrixType> void miscMatrices(const MatrixType& m)
void test_miscmatrices()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( miscMatrices(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( miscMatrices(Matrix4d()) );
- CALL_SUBTEST( miscMatrices(MatrixXcf(3, 3)) );
- CALL_SUBTEST( miscMatrices(MatrixXi(8, 12)) );
- CALL_SUBTEST( miscMatrices(MatrixXcd(20, 20)) );
+ CALL_SUBTEST_1( miscMatrices(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( miscMatrices(Matrix4d()) );
+ CALL_SUBTEST_3( miscMatrices(MatrixXcf(3, 3)) );
+ CALL_SUBTEST_4( miscMatrices(MatrixXi(8, 12)) );
+ CALL_SUBTEST_5( miscMatrices(MatrixXcd(20, 20)) );
}
}
diff --git a/test/mixingtypes.cpp b/test/mixingtypes.cpp
index 3e322c7fe..1dcd77a8a 100644
--- a/test/mixingtypes.cpp
+++ b/test/mixingtypes.cpp
@@ -174,10 +174,10 @@ template<int SizeAtCompileType> void mixingtypes_small()
void test_mixingtypes()
{
// check that our operator new is indeed called:
- CALL_SUBTEST(mixingtypes<3>());
- CALL_SUBTEST(mixingtypes<4>());
- CALL_SUBTEST(mixingtypes<Dynamic>(20));
+ CALL_SUBTEST_1(mixingtypes<3>());
+ CALL_SUBTEST_2(mixingtypes<4>());
+ CALL_SUBTEST_3(mixingtypes<Dynamic>(20));
- CALL_SUBTEST(mixingtypes_small<4>());
- CALL_SUBTEST(mixingtypes_large(20));
+ CALL_SUBTEST_4(mixingtypes_small<4>());
+ CALL_SUBTEST_5(mixingtypes_large(20));
}
diff --git a/test/nomalloc.cpp b/test/nomalloc.cpp
index a96bb23da..1a917192b 100644
--- a/test/nomalloc.cpp
+++ b/test/nomalloc.cpp
@@ -77,7 +77,7 @@ void test_nomalloc()
{
// check that our operator new is indeed called:
VERIFY_RAISES_ASSERT(MatrixXd dummy = MatrixXd::Random(3,3));
- CALL_SUBTEST( nomalloc(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( nomalloc(Matrix4d()) );
- CALL_SUBTEST( nomalloc(Matrix<float,32,32>()) );
+ CALL_SUBTEST(nomalloc(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST(nomalloc(Matrix4d()) );
+ CALL_SUBTEST(nomalloc(Matrix<float,32,32>()) );
}
diff --git a/test/packetmath.cpp b/test/packetmath.cpp
index 1745ae5c6..7d863e616 100644
--- a/test/packetmath.cpp
+++ b/test/packetmath.cpp
@@ -233,12 +233,12 @@ template<typename Scalar> void packetmath_real()
void test_packetmath()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( packetmath<float>() );
- CALL_SUBTEST( packetmath<double>() );
- CALL_SUBTEST( packetmath<int>() );
- CALL_SUBTEST( packetmath<std::complex<float> >() );
+ CALL_SUBTEST_1( packetmath<float>() );
+ CALL_SUBTEST_2( packetmath<double>() );
+ CALL_SUBTEST_3( packetmath<int>() );
+ CALL_SUBTEST_1( packetmath<std::complex<float> >() );
- CALL_SUBTEST( packetmath_real<float>() );
- CALL_SUBTEST( packetmath_real<double>() );
+ CALL_SUBTEST_1( packetmath_real<float>() );
+ CALL_SUBTEST_2( packetmath_real<double>() );
}
}
diff --git a/test/product_extra.cpp b/test/product_extra.cpp
index aeaf04d83..e4c853461 100644
--- a/test/product_extra.cpp
+++ b/test/product_extra.cpp
@@ -119,8 +119,8 @@ template<typename MatrixType> void product_extra(const MatrixType& m)
void test_product_extra()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST1( product_extra(MatrixXf(ei_random<int>(2,320), ei_random<int>(2,320))) );
- CALL_SUBTEST2( product_extra(MatrixXcf(ei_random<int>(50,50), ei_random<int>(50,50))) );
- CALL_SUBTEST3( product_extra(Matrix<std::complex<double>,Dynamic,Dynamic,RowMajor>(ei_random<int>(2,50), ei_random<int>(2,50))) );
+ CALL_SUBTEST_1( product_extra(MatrixXf(ei_random<int>(2,320), ei_random<int>(2,320))) );
+ CALL_SUBTEST_2( product_extra(MatrixXcf(ei_random<int>(50,50), ei_random<int>(50,50))) );
+ CALL_SUBTEST_3( product_extra(Matrix<std::complex<double>,Dynamic,Dynamic,RowMajor>(ei_random<int>(2,50), ei_random<int>(2,50))) );
}
}
diff --git a/test/product_large.cpp b/test/product_large.cpp
index a64775f6c..519213236 100644
--- a/test/product_large.cpp
+++ b/test/product_large.cpp
@@ -27,11 +27,11 @@
void test_product_large()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST1( product(MatrixXf(ei_random<int>(1,320), ei_random<int>(1,320))) );
- CALL_SUBTEST2( product(MatrixXd(ei_random<int>(1,320), ei_random<int>(1,320))) );
- CALL_SUBTEST3( product(MatrixXi(ei_random<int>(1,320), ei_random<int>(1,320))) );
- CALL_SUBTEST4( product(MatrixXcf(ei_random<int>(1,50), ei_random<int>(1,50))) );
- CALL_SUBTEST5( product(Matrix<float,Dynamic,Dynamic,RowMajor>(ei_random<int>(1,320), ei_random<int>(1,320))) );
+ CALL_SUBTEST_1( product(MatrixXf(ei_random<int>(1,320), ei_random<int>(1,320))) );
+ CALL_SUBTEST_2( product(MatrixXd(ei_random<int>(1,320), ei_random<int>(1,320))) );
+ CALL_SUBTEST_3( product(MatrixXi(ei_random<int>(1,320), ei_random<int>(1,320))) );
+ CALL_SUBTEST_4( product(MatrixXcf(ei_random<int>(1,50), ei_random<int>(1,50))) );
+ CALL_SUBTEST_5( product(Matrix<float,Dynamic,Dynamic,RowMajor>(ei_random<int>(1,320), ei_random<int>(1,320))) );
}
#if defined EIGEN_TEST_PART_6
diff --git a/test/product_notemporary.cpp b/test/product_notemporary.cpp
index e9efeaaae..e592afff7 100644
--- a/test/product_notemporary.cpp
+++ b/test/product_notemporary.cpp
@@ -117,8 +117,8 @@ void test_product_notemporary()
int s;
for(int i = 0; i < g_repeat; i++) {
s = ei_random<int>(16,320);
- CALL_SUBTEST1( product_notemporary(MatrixXf(s, s)) );
+ CALL_SUBTEST_1( product_notemporary(MatrixXf(s, s)) );
s = ei_random<int>(16,120);
- CALL_SUBTEST2( product_notemporary(MatrixXcd(s,s)) );
+ CALL_SUBTEST_2( product_notemporary(MatrixXcd(s,s)) );
}
}
diff --git a/test/product_selfadjoint.cpp b/test/product_selfadjoint.cpp
index 065d4ad8c..aa8da37bd 100644
--- a/test/product_selfadjoint.cpp
+++ b/test/product_selfadjoint.cpp
@@ -78,13 +78,13 @@ template<typename MatrixType> void product_selfadjoint(const MatrixType& m)
void test_product_selfadjoint()
{
for(int i = 0; i < g_repeat ; i++) {
- CALL_SUBTEST1( product_selfadjoint(Matrix<float, 1, 1>()) );
- CALL_SUBTEST2( product_selfadjoint(Matrix<float, 2, 2>()) );
- CALL_SUBTEST3( product_selfadjoint(Matrix3d()) );
- CALL_SUBTEST4( product_selfadjoint(MatrixXcf(4, 4)) );
- CALL_SUBTEST5( product_selfadjoint(MatrixXcd(21,21)) );
- CALL_SUBTEST6( product_selfadjoint(MatrixXd(14,14)) );
- CALL_SUBTEST7( product_selfadjoint(Matrix<float,Dynamic,Dynamic,RowMajor>(17,17)) );
- CALL_SUBTEST8( product_selfadjoint(Matrix<std::complex<double>,Dynamic,Dynamic,RowMajor>(19, 19)) );
+ CALL_SUBTEST_1( product_selfadjoint(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( product_selfadjoint(Matrix<float, 2, 2>()) );
+ CALL_SUBTEST_3( product_selfadjoint(Matrix3d()) );
+ CALL_SUBTEST_4( product_selfadjoint(MatrixXcf(4, 4)) );
+ CALL_SUBTEST_5( product_selfadjoint(MatrixXcd(21,21)) );
+ CALL_SUBTEST_6( product_selfadjoint(MatrixXd(14,14)) );
+ CALL_SUBTEST_7( product_selfadjoint(Matrix<float,Dynamic,Dynamic,RowMajor>(17,17)) );
+ CALL_SUBTEST_8( product_selfadjoint(Matrix<std::complex<double>,Dynamic,Dynamic,RowMajor>(19, 19)) );
}
}
diff --git a/test/product_small.cpp b/test/product_small.cpp
index 3a667a5dc..d7f1c09ff 100644
--- a/test/product_small.cpp
+++ b/test/product_small.cpp
@@ -28,11 +28,11 @@
void test_product_small()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST1( product(Matrix<float, 3, 2>()) );
- CALL_SUBTEST2( product(Matrix<int, 3, 5>()) );
- CALL_SUBTEST3( product(Matrix3d()) );
- CALL_SUBTEST4( product(Matrix4d()) );
- CALL_SUBTEST5( product(Matrix4f()) );
+ CALL_SUBTEST_1( product(Matrix<float, 3, 2>()) );
+ CALL_SUBTEST_2( product(Matrix<int, 3, 5>()) );
+ CALL_SUBTEST_3( product(Matrix3d()) );
+ CALL_SUBTEST_4( product(Matrix4d()) );
+ CALL_SUBTEST_5( product(Matrix4f()) );
}
#ifdef EIGEN_TEST_PART_6
diff --git a/test/product_symm.cpp b/test/product_symm.cpp
index ecd46c78e..a9e055bd3 100644
--- a/test/product_symm.cpp
+++ b/test/product_symm.cpp
@@ -108,10 +108,10 @@ void test_product_symm()
{
for(int i = 0; i < g_repeat ; i++)
{
- CALL_SUBTEST1(( symm<float,Dynamic,Dynamic>(ei_random<int>(10,320),ei_random<int>(10,320)) ));
- CALL_SUBTEST2(( symm<std::complex<double>,Dynamic,Dynamic>(ei_random<int>(10,320),ei_random<int>(10,320)) ));
+ CALL_SUBTEST_1(( symm<float,Dynamic,Dynamic>(ei_random<int>(10,320),ei_random<int>(10,320)) ));
+ CALL_SUBTEST_2(( symm<std::complex<double>,Dynamic,Dynamic>(ei_random<int>(10,320),ei_random<int>(10,320)) ));
- CALL_SUBTEST3(( symm<float,Dynamic,1>(ei_random<int>(10,320)) ));
- CALL_SUBTEST4(( symm<std::complex<double>,Dynamic,1>(ei_random<int>(10,320)) ));
+ CALL_SUBTEST_3(( symm<float,Dynamic,1>(ei_random<int>(10,320)) ));
+ CALL_SUBTEST_4(( symm<std::complex<double>,Dynamic,1>(ei_random<int>(10,320)) ));
}
}
diff --git a/test/product_syrk.cpp b/test/product_syrk.cpp
index 78b67bb1a..37d54bf16 100644
--- a/test/product_syrk.cpp
+++ b/test/product_syrk.cpp
@@ -75,8 +75,8 @@ void test_product_syrk()
{
int s;
s = ei_random<int>(10,320);
- CALL_SUBTEST1( syrk(MatrixXf(s, s)) );
+ CALL_SUBTEST_1( syrk(MatrixXf(s, s)) );
s = ei_random<int>(10,320);
- CALL_SUBTEST2( syrk(MatrixXcd(s, s)) );
+ CALL_SUBTEST_2( syrk(MatrixXcd(s, s)) );
}
}
diff --git a/test/product_trmm.cpp b/test/product_trmm.cpp
index c3234ba7e..5f92391e6 100644
--- a/test/product_trmm.cpp
+++ b/test/product_trmm.cpp
@@ -63,7 +63,7 @@ void test_product_trmm()
{
for(int i = 0; i < g_repeat ; i++)
{
- CALL_SUBTEST1((trmm<float>(ei_random<int>(1,320),ei_random<int>(1,320))));
- CALL_SUBTEST2((trmm<std::complex<double> >(ei_random<int>(1,320),ei_random<int>(1,320))));
+ CALL_SUBTEST_1((trmm<float>(ei_random<int>(1,320),ei_random<int>(1,320))));
+ CALL_SUBTEST_2((trmm<std::complex<double> >(ei_random<int>(1,320),ei_random<int>(1,320))));
}
}
diff --git a/test/product_trmv.cpp b/test/product_trmv.cpp
index 602cdca03..5016a5b1f 100644
--- a/test/product_trmv.cpp
+++ b/test/product_trmv.cpp
@@ -82,11 +82,11 @@ template<typename MatrixType> void trmv(const MatrixType& m)
void test_product_trmv()
{
for(int i = 0; i < g_repeat ; i++) {
- CALL_SUBTEST1( trmv(Matrix<float, 1, 1>()) );
- CALL_SUBTEST2( trmv(Matrix<float, 2, 2>()) );
- CALL_SUBTEST3( trmv(Matrix3d()) );
- CALL_SUBTEST4( trmv(Matrix<std::complex<float>,23, 23>()) );
- CALL_SUBTEST5( trmv(MatrixXcd(17,17)) );
- CALL_SUBTEST6( trmv(Matrix<float,Dynamic,Dynamic,RowMajor>(19, 19)) );
+ CALL_SUBTEST_1( trmv(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( trmv(Matrix<float, 2, 2>()) );
+ CALL_SUBTEST_3( trmv(Matrix3d()) );
+ CALL_SUBTEST_4( trmv(Matrix<std::complex<float>,23, 23>()) );
+ CALL_SUBTEST_5( trmv(MatrixXcd(17,17)) );
+ CALL_SUBTEST_6( trmv(Matrix<float,Dynamic,Dynamic,RowMajor>(19, 19)) );
}
}
diff --git a/test/product_trsm.cpp b/test/product_trsm.cpp
index 2bd2e5e02..f850e031a 100644
--- a/test/product_trsm.cpp
+++ b/test/product_trsm.cpp
@@ -59,7 +59,7 @@ void test_product_trsm()
{
for(int i = 0; i < g_repeat ; i++)
{
- CALL_SUBTEST1((trsm<float>(ei_random<int>(1,320),ei_random<int>(1,320))));
- CALL_SUBTEST2((trsm<std::complex<double> >(ei_random<int>(1,320),ei_random<int>(1,320))));
+ CALL_SUBTEST_1((trsm<float>(ei_random<int>(1,320),ei_random<int>(1,320))));
+ CALL_SUBTEST_2((trsm<std::complex<double> >(ei_random<int>(1,320),ei_random<int>(1,320))));
}
}
diff --git a/test/qr.cpp b/test/qr.cpp
index 864828750..cbb23c4ca 100644
--- a/test/qr.cpp
+++ b/test/qr.cpp
@@ -115,24 +115,24 @@ template<typename MatrixType> void qr_verify_assert()
void test_qr()
{
for(int i = 0; i < 1; i++) {
- CALL_SUBTEST( qr(MatrixXf(47,40)) );
- CALL_SUBTEST( qr(MatrixXcd(17,7)) );
- CALL_SUBTEST(( qr_fixedsize<Matrix<float,3,4>, 2 >() ));
- CALL_SUBTEST(( qr_fixedsize<Matrix<double,6,2>, 4 >() ));
- CALL_SUBTEST(( qr_fixedsize<Matrix<double,2,5>, 7 >() ));
+ CALL_SUBTEST_1( qr(MatrixXf(47,40)) );
+ CALL_SUBTEST_2( qr(MatrixXcd(17,7)) );
+ CALL_SUBTEST_3(( qr_fixedsize<Matrix<float,3,4>, 2 >() ));
+ CALL_SUBTEST_4(( qr_fixedsize<Matrix<double,6,2>, 4 >() ));
+ CALL_SUBTEST_5(( qr_fixedsize<Matrix<double,2,5>, 7 >() ));
}
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( qr_invertible<MatrixXf>() );
- CALL_SUBTEST( qr_invertible<MatrixXd>() );
- CALL_SUBTEST( qr_invertible<MatrixXcf>() );
- CALL_SUBTEST( qr_invertible<MatrixXcd>() );
+ CALL_SUBTEST_1( qr_invertible<MatrixXf>() );
+ CALL_SUBTEST_6( qr_invertible<MatrixXd>() );
+ CALL_SUBTEST_7( qr_invertible<MatrixXcf>() );
+ CALL_SUBTEST_8( qr_invertible<MatrixXcd>() );
}
- CALL_SUBTEST(qr_verify_assert<Matrix3f>());
- CALL_SUBTEST(qr_verify_assert<Matrix3d>());
- CALL_SUBTEST(qr_verify_assert<MatrixXf>());
- CALL_SUBTEST(qr_verify_assert<MatrixXd>());
- CALL_SUBTEST(qr_verify_assert<MatrixXcf>());
- CALL_SUBTEST(qr_verify_assert<MatrixXcd>());
+ CALL_SUBTEST_9(qr_verify_assert<Matrix3f>());
+ CALL_SUBTEST_10(qr_verify_assert<Matrix3d>());
+ CALL_SUBTEST_1(qr_verify_assert<MatrixXf>());
+ CALL_SUBTEST_6(qr_verify_assert<MatrixXd>());
+ CALL_SUBTEST_7(qr_verify_assert<MatrixXcf>());
+ CALL_SUBTEST_8(qr_verify_assert<MatrixXcd>());
}
diff --git a/test/qr_colpivoting.cpp b/test/qr_colpivoting.cpp
index 5c5c5d259..406be597d 100644
--- a/test/qr_colpivoting.cpp
+++ b/test/qr_colpivoting.cpp
@@ -36,7 +36,7 @@ template<typename MatrixType> void qr()
typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> VectorType;
MatrixType m1;
createRandomMatrixOfRank(rank,rows,cols,m1);
- ColPivotingHouseholderQR<MatrixType> qr(m1);
+ ColPivHouseholderQR<MatrixType> qr(m1);
VERIFY_IS_APPROX(rank, qr.rank());
VERIFY(cols - qr.rank() == qr.dimensionOfKernel());
VERIFY(!qr.isInjective());
@@ -74,7 +74,7 @@ template<typename MatrixType, int Cols2> void qr_fixedsize()
int rank = ei_random<int>(1, std::min(int(Rows), int(Cols))-1);
Matrix<Scalar,Rows,Cols> m1;
createRandomMatrixOfRank(rank,Rows,Cols,m1);
- ColPivotingHouseholderQR<Matrix<Scalar,Rows,Cols> > qr(m1);
+ ColPivHouseholderQR<Matrix<Scalar,Rows,Cols> > qr(m1);
VERIFY_IS_APPROX(rank, qr.rank());
VERIFY(Cols - qr.rank() == qr.dimensionOfKernel());
VERIFY(!qr.isInjective());
@@ -118,7 +118,7 @@ template<typename MatrixType> void qr_invertible()
m1 += a * a.adjoint();
}
- ColPivotingHouseholderQR<MatrixType> qr(m1);
+ ColPivHouseholderQR<MatrixType> qr(m1);
m3 = MatrixType::Random(size,size);
qr.solve(m3, &m2);
VERIFY_IS_APPROX(m3, m1*m2);
@@ -138,7 +138,7 @@ template<typename MatrixType> void qr_verify_assert()
{
MatrixType tmp;
- ColPivotingHouseholderQR<MatrixType> qr;
+ ColPivHouseholderQR<MatrixType> qr;
VERIFY_RAISES_ASSERT(qr.matrixQR())
VERIFY_RAISES_ASSERT(qr.solve(tmp,&tmp))
VERIFY_RAISES_ASSERT(qr.matrixQ())
@@ -155,24 +155,24 @@ template<typename MatrixType> void qr_verify_assert()
void test_qr_colpivoting()
{
for(int i = 0; i < 1; i++) {
- CALL_SUBTEST( qr<MatrixXf>() );
- CALL_SUBTEST( qr<MatrixXd>() );
- CALL_SUBTEST( qr<MatrixXcd>() );
- CALL_SUBTEST(( qr_fixedsize<Matrix<float,3,5>, 4 >() ));
- CALL_SUBTEST(( qr_fixedsize<Matrix<double,6,2>, 3 >() ));
+ CALL_SUBTEST_1( qr<MatrixXf>() );
+ CALL_SUBTEST_2( qr<MatrixXd>() );
+ CALL_SUBTEST_3( qr<MatrixXcd>() );
+ CALL_SUBTEST_4(( qr_fixedsize<Matrix<float,3,5>, 4 >() ));
+ CALL_SUBTEST_5(( qr_fixedsize<Matrix<double,6,2>, 3 >() ));
}
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( qr_invertible<MatrixXf>() );
- CALL_SUBTEST( qr_invertible<MatrixXd>() );
- CALL_SUBTEST( qr_invertible<MatrixXcf>() );
- CALL_SUBTEST( qr_invertible<MatrixXcd>() );
+ CALL_SUBTEST_1( qr_invertible<MatrixXf>() );
+ CALL_SUBTEST_2( qr_invertible<MatrixXd>() );
+ CALL_SUBTEST_6( qr_invertible<MatrixXcf>() );
+ CALL_SUBTEST_3( qr_invertible<MatrixXcd>() );
}
- CALL_SUBTEST(qr_verify_assert<Matrix3f>());
- CALL_SUBTEST(qr_verify_assert<Matrix3d>());
- CALL_SUBTEST(qr_verify_assert<MatrixXf>());
- CALL_SUBTEST(qr_verify_assert<MatrixXd>());
- CALL_SUBTEST(qr_verify_assert<MatrixXcf>());
- CALL_SUBTEST(qr_verify_assert<MatrixXcd>());
+ CALL_SUBTEST_7(qr_verify_assert<Matrix3f>());
+ CALL_SUBTEST_8(qr_verify_assert<Matrix3d>());
+ CALL_SUBTEST_1(qr_verify_assert<MatrixXf>());
+ CALL_SUBTEST_2(qr_verify_assert<MatrixXd>());
+ CALL_SUBTEST_6(qr_verify_assert<MatrixXcf>());
+ CALL_SUBTEST_3(qr_verify_assert<MatrixXcd>());
}
diff --git a/test/qr_fullpivoting.cpp b/test/qr_fullpivoting.cpp
index 891c2a527..38ee4eac1 100644
--- a/test/qr_fullpivoting.cpp
+++ b/test/qr_fullpivoting.cpp
@@ -36,7 +36,7 @@ template<typename MatrixType> void qr()
typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> VectorType;
MatrixType m1;
createRandomMatrixOfRank(rank,rows,cols,m1);
- FullPivotingHouseholderQR<MatrixType> qr(m1);
+ FullPivHouseholderQR<MatrixType> qr(m1);
VERIFY_IS_APPROX(rank, qr.rank());
VERIFY(cols - qr.rank() == qr.dimensionOfKernel());
VERIFY(!qr.isInjective());
@@ -84,7 +84,7 @@ template<typename MatrixType> void qr_invertible()
m1 += a * a.adjoint();
}
- FullPivotingHouseholderQR<MatrixType> qr(m1);
+ FullPivHouseholderQR<MatrixType> qr(m1);
VERIFY(qr.isInjective());
VERIFY(qr.isInvertible());
VERIFY(qr.isSurjective());
@@ -108,7 +108,7 @@ template<typename MatrixType> void qr_verify_assert()
{
MatrixType tmp;
- FullPivotingHouseholderQR<MatrixType> qr;
+ FullPivHouseholderQR<MatrixType> qr;
VERIFY_RAISES_ASSERT(qr.matrixQR())
VERIFY_RAISES_ASSERT(qr.solve(tmp,&tmp))
VERIFY_RAISES_ASSERT(qr.matrixQ())
@@ -126,23 +126,23 @@ void test_qr_fullpivoting()
{
for(int i = 0; i < 1; i++) {
// FIXME : very weird bug here
-// CALL_SUBTEST( qr(Matrix2f()) );
- CALL_SUBTEST( qr<MatrixXf>() );
- CALL_SUBTEST( qr<MatrixXd>() );
- CALL_SUBTEST( qr<MatrixXcd>() );
+// CALL_SUBTEST(qr(Matrix2f()) );
+ CALL_SUBTEST_1( qr<MatrixXf>() );
+ CALL_SUBTEST_2( qr<MatrixXd>() );
+ CALL_SUBTEST_3( qr<MatrixXcd>() );
}
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( qr_invertible<MatrixXf>() );
- CALL_SUBTEST( qr_invertible<MatrixXd>() );
- CALL_SUBTEST( qr_invertible<MatrixXcf>() );
- CALL_SUBTEST( qr_invertible<MatrixXcd>() );
+ CALL_SUBTEST_1( qr_invertible<MatrixXf>() );
+ CALL_SUBTEST_2( qr_invertible<MatrixXd>() );
+ CALL_SUBTEST_4( qr_invertible<MatrixXcf>() );
+ CALL_SUBTEST_3( qr_invertible<MatrixXcd>() );
}
- CALL_SUBTEST(qr_verify_assert<Matrix3f>());
- CALL_SUBTEST(qr_verify_assert<Matrix3d>());
- CALL_SUBTEST(qr_verify_assert<MatrixXf>());
- CALL_SUBTEST(qr_verify_assert<MatrixXd>());
- CALL_SUBTEST(qr_verify_assert<MatrixXcf>());
- CALL_SUBTEST(qr_verify_assert<MatrixXcd>());
+ CALL_SUBTEST_5(qr_verify_assert<Matrix3f>());
+ CALL_SUBTEST_6(qr_verify_assert<Matrix3d>());
+ CALL_SUBTEST_1(qr_verify_assert<MatrixXf>());
+ CALL_SUBTEST_2(qr_verify_assert<MatrixXd>());
+ CALL_SUBTEST_4(qr_verify_assert<MatrixXcf>());
+ CALL_SUBTEST_3(qr_verify_assert<MatrixXcd>());
}
diff --git a/test/redux.cpp b/test/redux.cpp
index 951b34bca..c075c1393 100644
--- a/test/redux.cpp
+++ b/test/redux.cpp
@@ -112,16 +112,16 @@ template<typename VectorType> void vectorRedux(const VectorType& w)
void test_redux()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( matrixRedux(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( matrixRedux(Matrix2f()) );
- CALL_SUBTEST( matrixRedux(Matrix4d()) );
- CALL_SUBTEST( matrixRedux(MatrixXcf(3, 3)) );
- CALL_SUBTEST( matrixRedux(MatrixXd(8, 12)) );
- CALL_SUBTEST( matrixRedux(MatrixXi(8, 12)) );
+ CALL_SUBTEST_1( matrixRedux(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( matrixRedux(Matrix2f()) );
+ CALL_SUBTEST_3( matrixRedux(Matrix4d()) );
+ CALL_SUBTEST_4( matrixRedux(MatrixXcf(3, 3)) );
+ CALL_SUBTEST_5( matrixRedux(MatrixXd(8, 12)) );
+ CALL_SUBTEST_6( matrixRedux(MatrixXi(8, 12)) );
}
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( vectorRedux(Vector4f()) );
- CALL_SUBTEST( vectorRedux(VectorXd(10)) );
- CALL_SUBTEST( vectorRedux(VectorXf(33)) );
+ CALL_SUBTEST_7( vectorRedux(Vector4f()) );
+ CALL_SUBTEST_5( vectorRedux(VectorXd(10)) );
+ CALL_SUBTEST_8( vectorRedux(VectorXf(33)) );
}
}
diff --git a/test/regression.cpp b/test/regression.cpp
index 28b6356b3..0e2323bf6 100644
--- a/test/regression.cpp
+++ b/test/regression.cpp
@@ -95,6 +95,7 @@ void test_regression()
{
for(int i = 0; i < g_repeat; i++)
{
+#ifdef EIGEN_TEST_PART_1
{
Vector2f points2f [1000];
Vector2f *points2f_ptrs [1000];
@@ -108,7 +109,9 @@ void test_regression()
CALL_SUBTEST(check_linearRegression(100, points2f_ptrs, coeffs2f, 0.01f));
CALL_SUBTEST(check_linearRegression(1000, points2f_ptrs, coeffs2f, 0.002f));
}
+#endif
+#ifdef EIGEN_TEST_PART_2
{
Vector2f points2f [1000];
Vector2f *points2f_ptrs [1000];
@@ -119,7 +122,9 @@ void test_regression()
CALL_SUBTEST(check_fitHyperplane(100, points2f_ptrs, coeffs3f, 0.01f));
CALL_SUBTEST(check_fitHyperplane(1000, points2f_ptrs, coeffs3f, 0.002f));
}
+#endif
+#ifdef EIGEN_TEST_PART_3
{
Vector4d points4d [1000];
Vector4d *points4d_ptrs [1000];
@@ -130,7 +135,9 @@ void test_regression()
CALL_SUBTEST(check_fitHyperplane(100, points4d_ptrs, coeffs5d, 0.01));
CALL_SUBTEST(check_fitHyperplane(1000, points4d_ptrs, coeffs5d, 0.002));
}
+#endif
+#ifdef EIGEN_TEST_PART_4
{
VectorXcd *points11cd_ptrs[1000];
for(int i = 0; i < 1000; i++) points11cd_ptrs[i] = new VectorXcd(11);
@@ -141,5 +148,6 @@ void test_regression()
delete coeffs12cd;
for(int i = 0; i < 1000; i++) delete points11cd_ptrs[i];
}
+#endif
}
}
diff --git a/test/resize.cpp b/test/resize.cpp
index 3c8f21ee1..dfe3bda17 100644
--- a/test/resize.cpp
+++ b/test/resize.cpp
@@ -50,7 +50,7 @@ void resizeLikeTest31() { resizeLikeTest<3,1>(); }
void test_resize()
{
- CALL_SUBTEST( resizeLikeTest12() );
- CALL_SUBTEST( resizeLikeTest1020() );
- CALL_SUBTEST( resizeLikeTest31() );
+ CALL_SUBTEST(resizeLikeTest12() );
+ CALL_SUBTEST(resizeLikeTest1020() );
+ CALL_SUBTEST(resizeLikeTest31() );
}
diff --git a/test/sizeof.cpp b/test/sizeof.cpp
index 8dc9ca7ef..a7243591a 100644
--- a/test/sizeof.cpp
+++ b/test/sizeof.cpp
@@ -35,14 +35,14 @@ template<typename MatrixType> void verifySizeOf(const MatrixType&)
void test_sizeof()
{
- CALL_SUBTEST( verifySizeOf(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( verifySizeOf(Matrix4d()) );
- CALL_SUBTEST( verifySizeOf(Matrix<double, 4, 2>()) );
- CALL_SUBTEST( verifySizeOf(Matrix<bool, 7, 5>()) );
- CALL_SUBTEST( verifySizeOf(MatrixXcf(3, 3)) );
- CALL_SUBTEST( verifySizeOf(MatrixXi(8, 12)) );
- CALL_SUBTEST( verifySizeOf(MatrixXcd(20, 20)) );
- CALL_SUBTEST( verifySizeOf(Matrix<float, 100, 100>()) );
+ CALL_SUBTEST(verifySizeOf(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST(verifySizeOf(Matrix4d()) );
+ CALL_SUBTEST(verifySizeOf(Matrix<double, 4, 2>()) );
+ CALL_SUBTEST(verifySizeOf(Matrix<bool, 7, 5>()) );
+ CALL_SUBTEST(verifySizeOf(MatrixXcf(3, 3)) );
+ CALL_SUBTEST(verifySizeOf(MatrixXi(8, 12)) );
+ CALL_SUBTEST(verifySizeOf(MatrixXcd(20, 20)) );
+ CALL_SUBTEST(verifySizeOf(Matrix<float, 100, 100>()) );
VERIFY(sizeof(std::complex<float>) == 2*sizeof(float));
VERIFY(sizeof(std::complex<double>) == 2*sizeof(double));
diff --git a/test/smallvectors.cpp b/test/smallvectors.cpp
index f0807c796..d6dc8e97c 100644
--- a/test/smallvectors.cpp
+++ b/test/smallvectors.cpp
@@ -50,8 +50,8 @@ template<typename Scalar> void smallVectors()
void test_smallvectors()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( smallVectors<int>() );
- CALL_SUBTEST( smallVectors<float>() );
- CALL_SUBTEST( smallVectors<double>() );
+ CALL_SUBTEST(smallVectors<int>() );
+ CALL_SUBTEST(smallVectors<float>() );
+ CALL_SUBTEST(smallVectors<double>() );
}
}
diff --git a/test/sparse_basic.cpp b/test/sparse_basic.cpp
index 666eea872..050b14995 100644
--- a/test/sparse_basic.cpp
+++ b/test/sparse_basic.cpp
@@ -344,10 +344,10 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re
void test_sparse_basic()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( sparse_basic(SparseMatrix<double>(8, 8)) );
- CALL_SUBTEST( sparse_basic(SparseMatrix<std::complex<double> >(16, 16)) );
- CALL_SUBTEST( sparse_basic(SparseMatrix<double>(33, 33)) );
+ CALL_SUBTEST_1( sparse_basic(SparseMatrix<double>(8, 8)) );
+ CALL_SUBTEST_2( sparse_basic(SparseMatrix<std::complex<double> >(16, 16)) );
+ CALL_SUBTEST_1( sparse_basic(SparseMatrix<double>(33, 33)) );
- CALL_SUBTEST( sparse_basic(DynamicSparseMatrix<double>(8, 8)) );
+ CALL_SUBTEST_3( sparse_basic(DynamicSparseMatrix<double>(8, 8)) );
}
}
diff --git a/test/sparse_product.cpp b/test/sparse_product.cpp
index 743273f65..f2a4e8bb9 100644
--- a/test/sparse_product.cpp
+++ b/test/sparse_product.cpp
@@ -123,10 +123,10 @@ template<typename SparseMatrixType> void sparse_product(const SparseMatrixType&
void test_sparse_product()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( sparse_product(SparseMatrix<double>(8, 8)) );
- CALL_SUBTEST( sparse_product(SparseMatrix<std::complex<double> >(16, 16)) );
- CALL_SUBTEST( sparse_product(SparseMatrix<double>(33, 33)) );
+ CALL_SUBTEST_1( sparse_product(SparseMatrix<double>(8, 8)) );
+ CALL_SUBTEST_2( sparse_product(SparseMatrix<std::complex<double> >(16, 16)) );
+ CALL_SUBTEST_1( sparse_product(SparseMatrix<double>(33, 33)) );
- CALL_SUBTEST( sparse_product(DynamicSparseMatrix<double>(8, 8)) );
+ CALL_SUBTEST_3( sparse_product(DynamicSparseMatrix<double>(8, 8)) );
}
}
diff --git a/test/sparse_solvers.cpp b/test/sparse_solvers.cpp
index 09ae1ad60..6c1bb9b33 100644
--- a/test/sparse_solvers.cpp
+++ b/test/sparse_solvers.cpp
@@ -172,8 +172,8 @@ template<typename Scalar> void sparse_solvers(int rows, int cols)
initSparse<Scalar>(density, refMat2, m2, ForceNonZeroDiag, &zeroCoords, &nonzeroCoords);
- LU<DenseMatrix> refLu(refMat2);
- refLu.solve(b, &refX);
+ FullPivLU<DenseMatrix> refLu(refMat2);
+ refX = refLu.solve(b);
#if defined(EIGEN_SUPERLU_SUPPORT) || defined(EIGEN_UMFPACK_SUPPORT)
Scalar refDet = refLu.determinant();
#endif
@@ -229,8 +229,8 @@ template<typename Scalar> void sparse_solvers(int rows, int cols)
void test_sparse_solvers()
{
for(int i = 0; i < g_repeat; i++) {
-// CALL_SUBTEST( sparse_solvers<double>(8, 8) );
- CALL_SUBTEST( sparse_solvers<std::complex<double> >(16, 16) );
-// CALL_SUBTEST( sparse_solvers<double>(100, 100) );
+// CALL_SUBTEST(sparse_solvers<double>(8, 8) );
+ CALL_SUBTEST(sparse_solvers<std::complex<double> >(16, 16) );
+// CALL_SUBTEST(sparse_solvers<double>(100, 100) );
}
}
diff --git a/test/sparse_vector.cpp b/test/sparse_vector.cpp
index 236e14f1b..5c6dadc00 100644
--- a/test/sparse_vector.cpp
+++ b/test/sparse_vector.cpp
@@ -91,9 +91,9 @@ template<typename Scalar> void sparse_vector(int rows, int cols)
void test_sparse_vector()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( sparse_vector<double>(8, 8) );
- CALL_SUBTEST( sparse_vector<std::complex<double> >(16, 16) );
- CALL_SUBTEST( sparse_vector<double>(299, 535) );
+ CALL_SUBTEST_1( sparse_vector<double>(8, 8) );
+ CALL_SUBTEST_2( sparse_vector<std::complex<double> >(16, 16) );
+ CALL_SUBTEST_1( sparse_vector<double>(299, 535) );
}
}
diff --git a/test/stable_norm.cpp b/test/stable_norm.cpp
index ed72bb7a7..7661fc893 100644
--- a/test/stable_norm.cpp
+++ b/test/stable_norm.cpp
@@ -84,10 +84,10 @@ template<typename MatrixType> void stable_norm(const MatrixType& m)
void test_stable_norm()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( stable_norm(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( stable_norm(Vector4d()) );
- CALL_SUBTEST( stable_norm(VectorXd(ei_random<int>(10,2000))) );
- CALL_SUBTEST( stable_norm(VectorXf(ei_random<int>(10,2000))) );
- CALL_SUBTEST( stable_norm(VectorXcd(ei_random<int>(10,2000))) );
+ CALL_SUBTEST_1( stable_norm(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( stable_norm(Vector4d()) );
+ CALL_SUBTEST_3( stable_norm(VectorXd(ei_random<int>(10,2000))) );
+ CALL_SUBTEST_4( stable_norm(VectorXf(ei_random<int>(10,2000))) );
+ CALL_SUBTEST_5( stable_norm(VectorXcd(ei_random<int>(10,2000))) );
}
}
diff --git a/test/stdvector.cpp b/test/stdvector.cpp
index a976f0cf1..bdca826f4 100644
--- a/test/stdvector.cpp
+++ b/test/stdvector.cpp
@@ -135,29 +135,29 @@ void check_stdvector_quaternion(const QuaternionType&)
void test_stdvector()
{
// some non vectorizable fixed sizes
- CALL_SUBTEST(check_stdvector_matrix(Vector2f()));
- CALL_SUBTEST(check_stdvector_matrix(Matrix3f()));
- CALL_SUBTEST(check_stdvector_matrix(Matrix3d()));
+ CALL_SUBTEST_1(check_stdvector_matrix(Vector2f()));
+ CALL_SUBTEST_1(check_stdvector_matrix(Matrix3f()));
+ CALL_SUBTEST_2(check_stdvector_matrix(Matrix3d()));
// some vectorizable fixed sizes
- CALL_SUBTEST(check_stdvector_matrix(Matrix2f()));
- CALL_SUBTEST(check_stdvector_matrix(Vector4f()));
- CALL_SUBTEST(check_stdvector_matrix(Matrix4f()));
- CALL_SUBTEST(check_stdvector_matrix(Matrix4d()));
+ CALL_SUBTEST_1(check_stdvector_matrix(Matrix2f()));
+ CALL_SUBTEST_1(check_stdvector_matrix(Vector4f()));
+ CALL_SUBTEST_1(check_stdvector_matrix(Matrix4f()));
+ CALL_SUBTEST_2(check_stdvector_matrix(Matrix4d()));
// some dynamic sizes
- CALL_SUBTEST(check_stdvector_matrix(MatrixXd(1,1)));
- CALL_SUBTEST(check_stdvector_matrix(VectorXd(20)));
- CALL_SUBTEST(check_stdvector_matrix(RowVectorXf(20)));
- CALL_SUBTEST(check_stdvector_matrix(MatrixXcf(10,10)));
+ CALL_SUBTEST_3(check_stdvector_matrix(MatrixXd(1,1)));
+ CALL_SUBTEST_3(check_stdvector_matrix(VectorXd(20)));
+ CALL_SUBTEST_3(check_stdvector_matrix(RowVectorXf(20)));
+ CALL_SUBTEST_3(check_stdvector_matrix(MatrixXcf(10,10)));
// some Transform
- CALL_SUBTEST(check_stdvector_transform(Transform2f()));
- CALL_SUBTEST(check_stdvector_transform(Transform3f()));
- CALL_SUBTEST(check_stdvector_transform(Transform3d()));
- //CALL_SUBTEST(check_stdvector_transform(Transform4d()));
+ CALL_SUBTEST_4(check_stdvector_transform(Transform2f()));
+ CALL_SUBTEST_4(check_stdvector_transform(Transform3f()));
+ CALL_SUBTEST_4(check_stdvector_transform(Transform3d()));
+ //CALL_SUBTEST(heck_stdvector_transform(Transform4d()));
// some Quaternion
- CALL_SUBTEST(check_stdvector_quaternion(Quaternionf()));
- CALL_SUBTEST(check_stdvector_quaternion(Quaterniond()));
+ CALL_SUBTEST_5(check_stdvector_quaternion(Quaternionf()));
+ CALL_SUBTEST_5(check_stdvector_quaternion(Quaterniond()));
}
diff --git a/test/submatrices.cpp b/test/submatrices.cpp
index 6fe86c281..75b0fde4b 100644
--- a/test/submatrices.cpp
+++ b/test/submatrices.cpp
@@ -215,14 +215,14 @@ void data_and_stride(const MatrixType& m)
void test_submatrices()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( submatrices(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( submatrices(Matrix4d()) );
- CALL_SUBTEST( submatrices(MatrixXcf(3, 3)) );
- CALL_SUBTEST( submatrices(MatrixXi(8, 12)) );
- CALL_SUBTEST( submatrices(MatrixXcd(20, 20)) );
- CALL_SUBTEST( submatrices(MatrixXf(20, 20)) );
-
- CALL_SUBTEST( data_and_stride(MatrixXf(ei_random(5,50), ei_random(5,50))) );
- CALL_SUBTEST( data_and_stride(Matrix<int,Dynamic,Dynamic,RowMajor>(ei_random(5,50), ei_random(5,50))) );
+ CALL_SUBTEST_1( submatrices(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( submatrices(Matrix4d()) );
+ CALL_SUBTEST_3( submatrices(MatrixXcf(3, 3)) );
+ CALL_SUBTEST_4( submatrices(MatrixXi(8, 12)) );
+ CALL_SUBTEST_5( submatrices(MatrixXcd(20, 20)) );
+ CALL_SUBTEST_6( submatrices(MatrixXf(20, 20)) );
+
+ CALL_SUBTEST_6( data_and_stride(MatrixXf(ei_random(5,50), ei_random(5,50))) );
+ CALL_SUBTEST_7( data_and_stride(Matrix<int,Dynamic,Dynamic,RowMajor>(ei_random(5,50), ei_random(5,50))) );
}
}
diff --git a/test/svd.cpp b/test/svd.cpp
index e6a32bd3f..188698a0b 100644
--- a/test/svd.cpp
+++ b/test/svd.cpp
@@ -100,17 +100,17 @@ template<typename MatrixType> void svd_verify_assert()
void test_svd()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( svd(Matrix3f()) );
- CALL_SUBTEST( svd(Matrix4d()) );
- CALL_SUBTEST( svd(MatrixXf(7,7)) );
- CALL_SUBTEST( svd(MatrixXd(14,7)) );
+ CALL_SUBTEST_1( svd(Matrix3f()) );
+ CALL_SUBTEST_2( svd(Matrix4d()) );
+ CALL_SUBTEST_3( svd(MatrixXf(7,7)) );
+ CALL_SUBTEST_4( svd(MatrixXd(14,7)) );
// complex are not implemented yet
-// CALL_SUBTEST( svd(MatrixXcd(6,6)) );
-// CALL_SUBTEST( svd(MatrixXcf(3,3)) );
+// CALL_SUBTEST(svd(MatrixXcd(6,6)) );
+// CALL_SUBTEST(svd(MatrixXcf(3,3)) );
}
- CALL_SUBTEST( svd_verify_assert<Matrix3f>() );
- CALL_SUBTEST( svd_verify_assert<Matrix3d>() );
- CALL_SUBTEST( svd_verify_assert<MatrixXf>() );
- CALL_SUBTEST( svd_verify_assert<MatrixXd>() );
+ CALL_SUBTEST_1( svd_verify_assert<Matrix3f>() );
+ CALL_SUBTEST_2( svd_verify_assert<Matrix4d>() );
+ CALL_SUBTEST_3( svd_verify_assert<MatrixXf>() );
+ CALL_SUBTEST_4( svd_verify_assert<MatrixXd>() );
}
diff --git a/test/swap.cpp b/test/swap.cpp
index 8b325992c..c11f0fec0 100644
--- a/test/swap.cpp
+++ b/test/swap.cpp
@@ -91,8 +91,8 @@ template<typename MatrixType> void swap(const MatrixType& m)
void test_swap()
{
- CALL_SUBTEST( swap(Matrix3f()) ); // fixed size, no vectorization
- CALL_SUBTEST( swap(Matrix4d()) ); // fixed size, possible vectorization
- CALL_SUBTEST( swap(MatrixXd(3,3)) ); // dyn size, no vectorization
- CALL_SUBTEST( swap(MatrixXf(30,30)) ); // dyn size, possible vectorization
+ CALL_SUBTEST_1( swap(Matrix3f()) ); // fixed size, no vectorization
+ CALL_SUBTEST_2( swap(Matrix4d()) ); // fixed size, possible vectorization
+ CALL_SUBTEST_3( swap(MatrixXd(3,3)) ); // dyn size, no vectorization
+ CALL_SUBTEST_4( swap(MatrixXf(30,30)) ); // dyn size, possible vectorization
}
diff --git a/test/triangular.cpp b/test/triangular.cpp
index 1e0782523..ee02c0022 100644
--- a/test/triangular.cpp
+++ b/test/triangular.cpp
@@ -137,12 +137,12 @@ template<typename MatrixType> void triangular(const MatrixType& m)
void test_triangular()
{
for(int i = 0; i < g_repeat ; i++) {
- CALL_SUBTEST( triangular(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( triangular(Matrix<float, 2, 2>()) );
- CALL_SUBTEST( triangular(Matrix3d()) );
- CALL_SUBTEST( triangular(MatrixXcf(4, 4)) );
- CALL_SUBTEST( triangular(Matrix<std::complex<float>,8, 8>()) );
- CALL_SUBTEST( triangular(MatrixXcd(17,17)) );
- CALL_SUBTEST( triangular(Matrix<float,Dynamic,Dynamic,RowMajor>(5, 5)) );
+ CALL_SUBTEST_1( triangular(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( triangular(Matrix<float, 2, 2>()) );
+ CALL_SUBTEST_3( triangular(Matrix3d()) );
+ CALL_SUBTEST_4( triangular(MatrixXcf(4, 4)) );
+ CALL_SUBTEST_5( triangular(Matrix<std::complex<float>,8, 8>()) );
+ CALL_SUBTEST_6( triangular(MatrixXcd(17,17)) );
+ CALL_SUBTEST_7( triangular(Matrix<float,Dynamic,Dynamic,RowMajor>(5, 5)) );
}
}
diff --git a/test/umeyama.cpp b/test/umeyama.cpp
index 0999c59c9..09db27c1b 100644
--- a/test/umeyama.cpp
+++ b/test/umeyama.cpp
@@ -181,17 +181,17 @@ void test_umeyama()
// works also for dimensions bigger than 3...
for (int dim=2; dim<8; ++dim)
{
- CALL_SUBTEST(run_test<MatrixXd>(dim, num_elements));
- CALL_SUBTEST(run_test<MatrixXf>(dim, num_elements));
+ CALL_SUBTEST_1(run_test<MatrixXd>(dim, num_elements));
+ CALL_SUBTEST_2(run_test<MatrixXf>(dim, num_elements));
}
- CALL_SUBTEST((run_fixed_size_test<float, 2>(num_elements)));
- CALL_SUBTEST((run_fixed_size_test<float, 3>(num_elements)));
- CALL_SUBTEST((run_fixed_size_test<float, 4>(num_elements)));
+ CALL_SUBTEST_3((run_fixed_size_test<float, 2>(num_elements)));
+ CALL_SUBTEST_4((run_fixed_size_test<float, 3>(num_elements)));
+ CALL_SUBTEST_5((run_fixed_size_test<float, 4>(num_elements)));
- CALL_SUBTEST((run_fixed_size_test<double, 2>(num_elements)));
- CALL_SUBTEST((run_fixed_size_test<double, 3>(num_elements)));
- CALL_SUBTEST((run_fixed_size_test<double, 4>(num_elements)));
+ CALL_SUBTEST_6((run_fixed_size_test<double, 2>(num_elements)));
+ CALL_SUBTEST_7((run_fixed_size_test<double, 3>(num_elements)));
+ CALL_SUBTEST_8((run_fixed_size_test<double, 4>(num_elements)));
}
// Those two calls don't compile and result in meaningful error messages!
diff --git a/test/visitor.cpp b/test/visitor.cpp
index 6ec442bc8..65ee60ba4 100644
--- a/test/visitor.cpp
+++ b/test/visitor.cpp
@@ -115,17 +115,17 @@ template<typename VectorType> void vectorVisitor(const VectorType& w)
void test_visitor()
{
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( matrixVisitor(Matrix<float, 1, 1>()) );
- CALL_SUBTEST( matrixVisitor(Matrix2f()) );
- CALL_SUBTEST( matrixVisitor(Matrix4d()) );
- CALL_SUBTEST( matrixVisitor(MatrixXd(8, 12)) );
- CALL_SUBTEST( matrixVisitor(Matrix<double,Dynamic,Dynamic,RowMajor>(20, 20)) );
- CALL_SUBTEST( matrixVisitor(MatrixXi(8, 12)) );
+ CALL_SUBTEST_1( matrixVisitor(Matrix<float, 1, 1>()) );
+ CALL_SUBTEST_2( matrixVisitor(Matrix2f()) );
+ CALL_SUBTEST_3( matrixVisitor(Matrix4d()) );
+ CALL_SUBTEST_4( matrixVisitor(MatrixXd(8, 12)) );
+ CALL_SUBTEST_5( matrixVisitor(Matrix<double,Dynamic,Dynamic,RowMajor>(20, 20)) );
+ CALL_SUBTEST_6( matrixVisitor(MatrixXi(8, 12)) );
}
for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST( vectorVisitor(Vector4f()) );
- CALL_SUBTEST( vectorVisitor(VectorXd(10)) );
- CALL_SUBTEST( vectorVisitor(RowVectorXd(10)) );
- CALL_SUBTEST( vectorVisitor(VectorXf(33)) );
+ CALL_SUBTEST_7( vectorVisitor(Vector4f()) );
+ CALL_SUBTEST_8( vectorVisitor(VectorXd(10)) );
+ CALL_SUBTEST_9( vectorVisitor(RowVectorXd(10)) );
+ CALL_SUBTEST_10( vectorVisitor(VectorXf(33)) );
}
}