From 2c2b1405a351ca9167a8c10a69cb5fb576e879b0 Mon Sep 17 00:00:00 2001 From: Vladislav Sovrasov Date: Tue, 23 May 2017 12:20:48 +0300 Subject: [PATCH] Add test for Mat_::release() --- modules/core/test/test_mat.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/core/test/test_mat.cpp b/modules/core/test/test_mat.cpp index 7f2451e842..9ec196ba66 100644 --- a/modules/core/test/test_mat.cpp +++ b/modules/core/test/test_mat.cpp @@ -1725,4 +1725,12 @@ TEST(Core_Mat_array, SplitMerge) EXPECT_EQ(0, countNonZero(diff)); } } -#endif \ No newline at end of file +#endif + +TEST(Mat, regression_8680) +{ + Mat_ mat(3,1); + ASSERT_EQ(mat.channels(), 2); + mat.release(); + ASSERT_EQ(mat.channels(), 2); +}