aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/nomalloc.cpp
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-06-20 17:37:56 +0200
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-06-20 17:37:56 +0200
commitf1679c7185471289afaf702a45e336849d20a81a (patch)
tree2d6d649c8d0ae0985dfeaae2fdf2da47294264ae /test/nomalloc.cpp
parente402d34407226d9c2c5dfc14ef5d6dbf53ee3c8e (diff)
Utilize Index in all unit tests.
Diffstat (limited to 'test/nomalloc.cpp')
-rw-r--r--test/nomalloc.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/nomalloc.cpp b/test/nomalloc.cpp
index 9eb8d1310..f37dcd1b2 100644
--- a/test/nomalloc.cpp
+++ b/test/nomalloc.cpp
@@ -43,12 +43,12 @@ template<typename MatrixType> void nomalloc(const MatrixType& m)
{
/* this test check no dynamic memory allocation are issued with fixed-size matrices
*/
-
+ typedef typename MatrixType::Index Index;
typedef typename MatrixType::Scalar Scalar;
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
- int rows = m.rows();
- int cols = m.cols();
+ Index rows = m.rows();
+ Index cols = m.cols();
MatrixType m1 = MatrixType::Random(rows, cols),
m2 = MatrixType::Random(rows, cols),
@@ -64,8 +64,8 @@ template<typename MatrixType> void nomalloc(const MatrixType& m)
Scalar s1 = ei_random<Scalar>();
- int r = ei_random<int>(0, rows-1),
- c = ei_random<int>(0, cols-1);
+ Index r = ei_random<Index>(0, rows-1),
+ c = ei_random<Index>(0, cols-1);
VERIFY_IS_APPROX((m1+m2)*s1, s1*m1+s1*m2);
VERIFY_IS_APPROX((m1+m2)(r,c), (m1(r,c))+(m2(r,c)));