From a3f7edf7e7672094190e04a0b4417de1abfa3de5 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 23 Jun 2016 10:25:04 +0200 Subject: Biug 1242: fix comma init with empty matrices. --- test/commainitializer.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'test/commainitializer.cpp') 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 A1; + Matrix A2; + Matrix B; + B << A1, A2; + } + { + Matrix A1; + Matrix A2; + Matrix B; + B << A1, + A2; + } + } + } -- cgit v1.2.3