diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-11-05 23:30:49 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-11-05 23:30:49 +0100 |
commit | 478de03bd8d91ab6238f322ed4783daa71a97b40 (patch) | |
tree | 827465ec30c7f10f753513b46f7b92b2e08302dc /test | |
parent | cdd3e850608890acf74c56f4541a3b39078af8f0 (diff) |
fix a couple of warnings in the unit tests
Diffstat (limited to 'test')
-rw-r--r-- | test/cwiseop.cpp | 7 | ||||
-rw-r--r-- | test/eigen2support.cpp | 1 | ||||
-rw-r--r-- | test/geo_eulerangles.cpp | 1 | ||||
-rw-r--r-- | test/geo_homogeneous.cpp | 10 | ||||
-rw-r--r-- | test/geo_orthomethods.cpp | 4 |
5 files changed, 6 insertions, 17 deletions
diff --git a/test/cwiseop.cpp b/test/cwiseop.cpp index 571c5a800..b3ca94e3a 100644 --- a/test/cwiseop.cpp +++ b/test/cwiseop.cpp @@ -60,11 +60,8 @@ template<typename MatrixType> void cwiseops(const MatrixType& m) mzero = MatrixType::Zero(rows, cols), mones = MatrixType::Ones(rows, cols), identity = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> - ::Identity(rows, rows), - square = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>::Random(rows, rows); - VectorType v1 = VectorType::Random(rows), - v2 = VectorType::Random(rows), - vzero = VectorType::Zero(rows), + ::Identity(rows, rows); + VectorType vzero = VectorType::Zero(rows), vones = VectorType::Ones(rows), v3(rows); diff --git a/test/eigen2support.cpp b/test/eigen2support.cpp index a7269fed5..5d0202e34 100644 --- a/test/eigen2support.cpp +++ b/test/eigen2support.cpp @@ -35,7 +35,6 @@ template<typename MatrixType> void eigen2support(const MatrixType& m) Index cols = m.cols(); MatrixType m1 = MatrixType::Random(rows, cols), - m2 = MatrixType::Random(rows, cols), m3(rows, cols); Scalar s1 = internal::random<Scalar>(), diff --git a/test/geo_eulerangles.cpp b/test/geo_eulerangles.cpp index f82cb8fbe..8029a694e 100644 --- a/test/geo_eulerangles.cpp +++ b/test/geo_eulerangles.cpp @@ -42,7 +42,6 @@ template<typename Scalar> void eulerangles(void) #define VERIFY_EULER(I,J,K, X,Y,Z) { \ Vector3 ea = m.eulerAngles(I,J,K); \ - Matrix3 m1 = Matrix3(AngleAxisx(ea[0], Vector3::Unit##X()) * AngleAxisx(ea[1], Vector3::Unit##Y()) * AngleAxisx(ea[2], Vector3::Unit##Z())); \ VERIFY_IS_APPROX(m, Matrix3(AngleAxisx(ea[0], Vector3::Unit##X()) * AngleAxisx(ea[1], Vector3::Unit##Y()) * AngleAxisx(ea[2], Vector3::Unit##Z()))); \ } VERIFY_EULER(0,1,2, X,Y,Z); diff --git a/test/geo_homogeneous.cpp b/test/geo_homogeneous.cpp index 26254b757..3efcb77db 100644 --- a/test/geo_homogeneous.cpp +++ b/test/geo_homogeneous.cpp @@ -42,17 +42,13 @@ template<typename Scalar,int Size> void homogeneous(void) typedef Matrix<Scalar,Size+1,Size> T3MatrixType; VectorType v0 = VectorType::Random(), - v1 = VectorType::Random(), ones = VectorType::Ones(); - HVectorType hv0 = HVectorType::Random(), - hv1 = HVectorType::Random(); + HVectorType hv0 = HVectorType::Random(); - MatrixType m0 = MatrixType::Random(), - m1 = MatrixType::Random(); + MatrixType m0 = MatrixType::Random(); - HMatrixType hm0 = HMatrixType::Random(), - hm1 = HMatrixType::Random(); + HMatrixType hm0 = HMatrixType::Random(); hv0 << v0, 1; VERIFY_IS_APPROX(v0.homogeneous(), hv0); diff --git a/test/geo_orthomethods.cpp b/test/geo_orthomethods.cpp index 020ae7103..aa3c8b61d 100644 --- a/test/geo_orthomethods.cpp +++ b/test/geo_orthomethods.cpp @@ -88,9 +88,7 @@ template<typename Scalar, int Size> void orthomethods(int size=Size) typedef Matrix<Scalar,Size,3> MatrixN3; typedef Matrix<Scalar,3,1> Vector3; - VectorType v0 = VectorType::Random(size), - v1 = VectorType::Random(size), - v2 = VectorType::Random(size); + VectorType v0 = VectorType::Random(size); // unitOrthogonal VERIFY_IS_MUCH_SMALLER_THAN(v0.unitOrthogonal().dot(v0), Scalar(1)); |