diff options
author | Gael Guennebaud <g.gael@free.fr> | 2012-07-10 23:04:17 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2012-07-10 23:04:17 +0200 |
commit | 904ecdf9d8b9742ed6f59249d999e176587a695d (patch) | |
tree | 7807ad932d8bec0369805c1db7cbb3cc1613432a /test/diagonal.cpp | |
parent | 3e6329a0d92a951523d1d0f5e4f4565a87a52a45 (diff) |
Add a DynamicIndex constant for signed quantities and use it to fix the conflict
between Diagonal<S,-1> (the first sub diagonal) and a runtime super/sub diagonal which is now:
Diagonal<S,DynamicIndex>
Diffstat (limited to 'test/diagonal.cpp')
-rw-r--r-- | test/diagonal.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/diagonal.cpp b/test/diagonal.cpp index 191a91bae..9246d1233 100644 --- a/test/diagonal.cpp +++ b/test/diagonal.cpp @@ -46,17 +46,14 @@ template<typename MatrixType> void diagonal(const MatrixType& m) if (rows>2) { enum { - N1 = MatrixType::RowsAtCompileTime>1 ? 1 : 0, - N2 = MatrixType::RowsAtCompileTime>2 ? -2 : 0 + N1 = MatrixType::RowsAtCompileTime>2 ? 2 : 0, + N2 = MatrixType::RowsAtCompileTime>1 ? -1 : 0 }; // check sub/super diagonal - if(m1.template diagonal<N1>().RowsAtCompileTime!=Dynamic) + if(MatrixType::SizeAtCompileTime!=Dynamic) { VERIFY(m1.template diagonal<N1>().RowsAtCompileTime == m1.diagonal(N1).size()); - } - if(m1.template diagonal<N2>().RowsAtCompileTime!=Dynamic) - { VERIFY(m1.template diagonal<N2>().RowsAtCompileTime == m1.diagonal(N2).size()); } |