aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/commainitializer.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-06-23 10:25:04 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-06-23 10:25:04 +0200
commita3f7edf7e7672094190e04a0b4417de1abfa3de5 (patch)
tree39c44282cf1089692d3828828ee97be9dce8c742 /test/commainitializer.cpp
parenta29a2cb4ff4eb153d8e725f126f178371cc0468c (diff)
Biug 1242: fix comma init with empty matrices.
Diffstat (limited to 'test/commainitializer.cpp')
-rw-r--r--test/commainitializer.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/commainitializer.cpp b/test/commainitializer.cpp
index 99102b966..86bdb040e 100644
--- a/test/commainitializer.cpp
+++ b/test/commainitializer.cpp
@@ -43,4 +43,27 @@ void test_commainitializer()
4, 5, 6,
vec[2].transpose();
VERIFY_IS_APPROX(m3, ref);
+
+
+ // Check with empty matrices (bug #1242)
+ {
+ int const M = 0;
+ int const N1 = 2;
+ int const N2 = 1;
+
+ {
+ Matrix<double, M, N1> A1;
+ Matrix<double, M, N2> A2;
+ Matrix<double, M, N1 + N2> B;
+ B << A1, A2;
+ }
+ {
+ Matrix<double, N1, M> A1;
+ Matrix<double, N2, M> A2;
+ Matrix<double, N1 + N2, M> B;
+ B << A1,
+ A2;
+ }
+ }
+
}