Commit 7e0f1ec0 authored by Alexander Alekhin's avatar Alexander Alekhin

test: putText regression garbage test

parent bcbe2f12
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment