diff options
author | Hauke Heibel <hauke.heibel@gmail.com> | 2010-06-20 17:37:56 +0200 |
---|---|---|
committer | Hauke Heibel <hauke.heibel@gmail.com> | 2010-06-20 17:37:56 +0200 |
commit | f1679c7185471289afaf702a45e336849d20a81a (patch) | |
tree | 2d6d649c8d0ae0985dfeaae2fdf2da47294264ae /test/conservative_resize.cpp | |
parent | e402d34407226d9c2c5dfc14ef5d6dbf53ee3c8e (diff) |
Utilize Index in all unit tests.
Diffstat (limited to 'test/conservative_resize.cpp')
-rw-r--r-- | test/conservative_resize.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/conservative_resize.cpp b/test/conservative_resize.cpp index 825f23b37..f0aff37b9 100644 --- a/test/conservative_resize.cpp +++ b/test/conservative_resize.cpp @@ -32,6 +32,7 @@ template <typename Scalar, int Storage> void run_matrix_tests() { typedef Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Storage> MatrixType; + typedef MatrixType::Index Index; MatrixType m, n; @@ -51,8 +52,8 @@ void run_matrix_tests() // random shrinking ... for (int i=0; i<25; ++i) { - const int rows = ei_random<int>(1,50); - const int cols = ei_random<int>(1,50); + const Index rows = ei_random<Index>(1,50); + const Index cols = ei_random<Index>(1,50); m = n = MatrixType::Random(50,50); m.conservativeResize(rows,cols); VERIFY_IS_APPROX(m, n.block(0,0,rows,cols)); @@ -61,8 +62,8 @@ void run_matrix_tests() // random growing with zeroing ... for (int i=0; i<25; ++i) { - const int rows = ei_random<int>(50,75); - const int cols = ei_random<int>(50,75); + const Index rows = ei_random<Index>(50,75); + const Index cols = ei_random<Index>(50,75); m = n = MatrixType::Random(50,50); m.conservativeResizeLike(MatrixType::Zero(rows,cols)); VERIFY_IS_APPROX(m.block(0,0,n.rows(),n.cols()), n); |