aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/basicstuff.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-04-23 09:05:46 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-04-23 09:05:46 -0400
commitf22ade8ee4705abaa635fa482e97d0b80aa45912 (patch)
tree779e970a435a5df3f6494e0121837b7fe97cc042 /test/basicstuff.cpp
parent28dde19e40a3d758faa94f0fc228857f7b3192ea (diff)
restrict operator[] to vectors, not matrices.
Diffstat (limited to 'test/basicstuff.cpp')
-rw-r--r--test/basicstuff.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/basicstuff.cpp b/test/basicstuff.cpp
index 70b65a7be..efc08655d 100644
--- a/test/basicstuff.cpp
+++ b/test/basicstuff.cpp
@@ -22,6 +22,8 @@
// License and a copy of the GNU General Public License along with
// Eigen. If not, see <http://www.gnu.org/licenses/>.
+#define EIGEN_NO_STATIC_ASSERT
+
#include "main.h"
template<typename MatrixType> void basicStuff(const MatrixType& m)
@@ -96,6 +98,12 @@ template<typename MatrixType> void basicStuff(const MatrixType& m)
VERIFY_RAISES_ASSERT(m1 = (m2.block(0,0, rows-1, cols-1)));
}
+ if(cols!=1 && rows!=1)
+ {
+ VERIFY_RAISES_ASSERT(m1[0]);
+ VERIFY_RAISES_ASSERT((m1+m1)[0]);
+ }
+
VERIFY_IS_APPROX(m3 = m1,m1);
MatrixType m4;
VERIFY_IS_APPROX(m4 = m1,m1);