Skip to content

Commit 62c6656

Browse files
committed
Merge pull request opencv#9533 from alalek:regression_test_9507
2 parents 4acdcfd + f7a273c commit 62c6656

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

modules/core/test/test_mat.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1399,13 +1399,22 @@ TEST(Core_Matx, fromMat_)
13991399
}
14001400

14011401
#ifdef CV_CXX11
1402+
14021403
TEST(Core_Matx, from_initializer_list)
14031404
{
14041405
Mat_<double> a = (Mat_<double>(2,2) << 10, 11, 12, 13);
14051406
Matx22d b = {10, 11, 12, 13};
14061407
ASSERT_EQ( cvtest::norm(a, b, NORM_INF), 0.);
14071408
}
1408-
#endif
1409+
1410+
TEST(Core_Mat, regression_9507)
1411+
{
1412+
cv::Mat m = Mat::zeros(5, 5, CV_8UC3);
1413+
cv::Mat m2{m};
1414+
EXPECT_EQ(25u, m2.total());
1415+
}
1416+
1417+
#endif // CXX11
14091418

14101419
TEST(Core_InputArray, empty)
14111420
{

0 commit comments

Comments
 (0)