diff --git a/test/basicstuff.cpp b/test/basicstuff.cpp index 175f54009..767098341 100644 --- a/test/basicstuff.cpp +++ b/test/basicstuff.cpp @@ -195,6 +195,20 @@ void casting() } #endif +template +void fixedSizeMatrixConstruction() +{ + const Scalar raw[3] = {1,2,3}; + Matrix m(raw); + Array a(raw); + VERIFY(m(0) == 1); + VERIFY(m(1) == 2); + VERIFY(m(2) == 3); + VERIFY(a(0) == 1); + VERIFY(a(1) == 2); + VERIFY(a(2) == 3); +} + void test_basicstuff() { for(int i = 0; i < g_repeat; i++) { @@ -210,5 +224,9 @@ void test_basicstuff() CALL_SUBTEST_5( basicStuffComplex(MatrixXcd(internal::random(1,100), internal::random(1,100))) ); } + CALL_SUBTEST_1(fixedSizeMatrixConstruction()); + CALL_SUBTEST_1(fixedSizeMatrixConstruction()); + CALL_SUBTEST_1(fixedSizeMatrixConstruction()); + CALL_SUBTEST_2(casting()); }