test: putText regression garbage test

This commit is contained in:
Alexander Alekhin 2016-12-07 01:34:27 +03:00
parent bcbe2f123f
commit 7e0f1ec00a

View File

@ -710,5 +710,20 @@ TEST(Drawing, polylines)
}
TEST(Drawing, putText_no_garbage)
{
Size sz(640, 480);
Mat mat = Mat::zeros(sz, CV_8UC1);
mat = Scalar::all(0);
putText(mat, "029", Point(10, 350), 0, 10, Scalar(128), 15);
EXPECT_EQ(0, cv::countNonZero(mat(Rect(0, 0, 10, sz.height))));
EXPECT_EQ(0, cv::countNonZero(mat(Rect(sz.width-10, 0, 10, sz.height))));
EXPECT_EQ(0, cv::countNonZero(mat(Rect(205, 0, 10, sz.height))));
EXPECT_EQ(0, cv::countNonZero(mat(Rect(405, 0, 10, sz.height))));
}
} // namespace