aboutsummaryrefslogtreecommitdiff
path: root/test/stddeque_overload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/stddeque_overload.cpp')
-rw-r--r--test/stddeque_overload.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/stddeque_overload.cpp b/test/stddeque_overload.cpp
index 4da618bbf..0f59f0695 100644
--- a/test/stddeque_overload.cpp
+++ b/test/stddeque_overload.cpp
@@ -28,10 +28,10 @@ EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(Quaterniond)
template<typename MatrixType>
void check_stddeque_matrix(const MatrixType& m)
{
- typename MatrixType::Index rows = m.rows();
- typename MatrixType::Index cols = m.cols();
+ Index rows = m.rows();
+ Index cols = m.cols();
MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);
- std::deque<MatrixType> v(10, MatrixType(rows,cols)), w(20, y);
+ std::deque<MatrixType> v(10, MatrixType::Zero(rows,cols)), w(20, y);
v[5] = x;
w[6] = v[5];
VERIFY_IS_APPROX(w[6], v[5]);
@@ -64,8 +64,8 @@ template<typename TransformType>
void check_stddeque_transform(const TransformType&)
{
typedef typename TransformType::MatrixType MatrixType;
- TransformType x(MatrixType::Random()), y(MatrixType::Random());
- std::deque<TransformType> v(10), w(20, y);
+ TransformType x(MatrixType::Random()), y(MatrixType::Random()), ti=TransformType::Identity();
+ std::deque<TransformType> v(10,ti), w(20, y);
v[5] = x;
w[6] = v[5];
VERIFY_IS_APPROX(w[6], v[5]);
@@ -75,7 +75,7 @@ void check_stddeque_transform(const TransformType&)
VERIFY_IS_APPROX(w[i], v[i]);
}
- v.resize(21);
+ v.resize(21,ti);
v[20] = x;
VERIFY_IS_APPROX(v[20], x);
v.resize(22,y);
@@ -98,8 +98,8 @@ template<typename QuaternionType>
void check_stddeque_quaternion(const QuaternionType&)
{
typedef typename QuaternionType::Coefficients Coefficients;
- QuaternionType x(Coefficients::Random()), y(Coefficients::Random());
- std::deque<QuaternionType> v(10), w(20, y);
+ QuaternionType x(Coefficients::Random()), y(Coefficients::Random()), qi=QuaternionType::Identity();
+ std::deque<QuaternionType> v(10,qi), w(20, y);
v[5] = x;
w[6] = v[5];
VERIFY_IS_APPROX(w[6], v[5]);
@@ -109,7 +109,7 @@ void check_stddeque_quaternion(const QuaternionType&)
VERIFY_IS_APPROX(w[i], v[i]);
}
- v.resize(21);
+ v.resize(21,qi);
v[20] = x;
VERIFY_IS_APPROX(v[20], x);
v.resize(22,y);
@@ -128,7 +128,7 @@ void check_stddeque_quaternion(const QuaternionType&)
}
}
-void test_stddeque_overload()
+EIGEN_DECLARE_TEST(stddeque_overload)
{
// some non vectorizable fixed sizes
CALL_SUBTEST_1(check_stddeque_matrix(Vector2f()));