mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 13:47:32 +08:00
test: putText regression garbage test
This commit is contained in:
parent
bcbe2f123f
commit
7e0f1ec00a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user