From f7a273cfb349b9be912512293f5599d7c19b0bf5 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 1 Sep 2017 08:20:43 +0300 Subject: [PATCH] core(test): regression test for 9507 --- modules/core/test/test_mat.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/core/test/test_mat.cpp b/modules/core/test/test_mat.cpp index 4145895d12..70675127ba 100644 --- a/modules/core/test/test_mat.cpp +++ b/modules/core/test/test_mat.cpp @@ -1399,13 +1399,22 @@ TEST(Core_Matx, fromMat_) } #ifdef CV_CXX11 + TEST(Core_Matx, from_initializer_list) { Mat_ a = (Mat_(2,2) << 10, 11, 12, 13); Matx22d b = {10, 11, 12, 13}; ASSERT_EQ( cvtest::norm(a, b, NORM_INF), 0.); } -#endif + +TEST(Core_Mat, regression_9507) +{ + cv::Mat m = Mat::zeros(5, 5, CV_8UC3); + cv::Mat m2{m}; + EXPECT_EQ(25u, m2.total()); +} + +#endif // CXX11 TEST(Core_InputArray, empty) {