aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-05-11 11:09:41 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-05-11 11:09:41 +0000
commit9b256d997edbb2118bb51e53010d569fe1d1d835 (patch)
tree3483ba17c6f5af5d152c30e9af252673ac99c8d6
parent6a4e94f349fc2cf5de8666fa8129b91b429be7f0 (diff)
various minor updates of some unit tests
-rw-r--r--test/cholesky.cpp1
-rw-r--r--test/geo_alignedbox.cpp7
-rw-r--r--test/geo_hyperplane.cpp4
-rw-r--r--test/qr.cpp7
4 files changed, 14 insertions, 5 deletions
diff --git a/test/cholesky.cpp b/test/cholesky.cpp
index b0e0dd33c..a49625e90 100644
--- a/test/cholesky.cpp
+++ b/test/cholesky.cpp
@@ -139,6 +139,7 @@ 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()) );
diff --git a/test/geo_alignedbox.cpp b/test/geo_alignedbox.cpp
index 1ccc0da14..88163b9b2 100644
--- a/test/geo_alignedbox.cpp
+++ b/test/geo_alignedbox.cpp
@@ -63,6 +63,13 @@ template<typename BoxType> void alignedbox(const BoxType& _box)
VERIFY_IS_APPROX(hp1f.template cast<Scalar>(),b0);
AlignedBox<Scalar,Dim> hp1d = b0.template cast<Scalar>();
VERIFY_IS_APPROX(hp1d.template cast<Scalar>(),b0);
+
+ // alignment -- make sure there is no memory alignment assertion
+ BoxType *bp0 = new BoxType(dim);
+ BoxType *bp1 = new BoxType(dim);
+ bp0->extend(*bp1);
+ delete bp0;
+ delete bp1;
}
void test_geo_alignedbox()
diff --git a/test/geo_hyperplane.cpp b/test/geo_hyperplane.cpp
index de1ee8ba0..1a700fabf 100644
--- a/test/geo_hyperplane.cpp
+++ b/test/geo_hyperplane.cpp
@@ -121,8 +121,8 @@ template<typename Scalar> void lines()
VERIFY_IS_APPROX(result, center);
// check conversions between two types of lines
- CoeffsType converted_coeffs(HLine(PLine(line_u)).coeffs());
- converted_coeffs *= line_u.coeffs()(0)/converted_coeffs(0);
+ CoeffsType converted_coeffs = HLine(PLine(line_u)).coeffs();
+ converted_coeffs *= (line_u.coeffs()[0])/(converted_coeffs[0]);
VERIFY(line_u.coeffs().isApprox(converted_coeffs));
}
}
diff --git a/test/qr.cpp b/test/qr.cpp
index add4aa580..345ea17fd 100644
--- a/test/qr.cpp
+++ b/test/qr.cpp
@@ -157,16 +157,17 @@ void test_qr()
// CALL_SUBTEST( qr(MatrixXf(12,8)) );
// CALL_SUBTEST( qr(MatrixXcd(5,5)) );
// CALL_SUBTEST( qr(MatrixXcd(7,3)) );
+ CALL_SUBTEST( qr(MatrixXf(47,47)) );
}
for(int i = 0; i < g_repeat; i++) {
CALL_SUBTEST( qr_non_invertible<MatrixXf>() );
-// CALL_SUBTEST( qr_non_invertible<MatrixXd>() );
+ CALL_SUBTEST( qr_non_invertible<MatrixXd>() );
// TODO fix issue with complex
// CALL_SUBTEST( qr_non_invertible<MatrixXcf>() );
// CALL_SUBTEST( qr_non_invertible<MatrixXcd>() );
-// CALL_SUBTEST( qr_invertible<MatrixXf>() );
-// CALL_SUBTEST( qr_invertible<MatrixXd>() );
+ CALL_SUBTEST( qr_invertible<MatrixXf>() );
+ CALL_SUBTEST( qr_invertible<MatrixXd>() );
// TODO fix issue with complex
// CALL_SUBTEST( qr_invertible<MatrixXcf>() );
// CALL_SUBTEST( qr_invertible<MatrixXcd>() );