TEST(Core_IOArray, submat_assignment) { Mat1f A = Mat1f::zeros(2,2); Mat1f B = Mat1f::ones(1,3); EXPECT_THROW( B.colRange(0,3).copyTo(A.row(0)), cv::Exception ); EXPECT_NO_THROW( B.colRange(0,2).copyTo(A.row(0)) ); EXPECT_EQ( 1.0f, A(0,0) ); EXPECT_EQ( 1.0f, A(0,1) ); }
TEST(Core_IOArray, submat_create) { Mat1f A = Mat1f::zeros(2,2); EXPECT_THROW( OutputArray_create1(A.row(0)), cv::Exception ); EXPECT_THROW( OutputArray_create2(A.row(0)), cv::Exception ); }