mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -2355,4 +2355,20 @@ TEST(Mat, regression_18473)
|
||||
}
|
||||
|
||||
|
||||
TEST(Mat, ptrVecni_20044)
|
||||
{
|
||||
Mat_<int> m(3,4); m << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
|
||||
Vec2i idx(1,1);
|
||||
|
||||
uchar *u = m.ptr(idx);
|
||||
EXPECT_EQ(int(6), *(int*)(u));
|
||||
const uchar *cu = m.ptr(idx);
|
||||
EXPECT_EQ(int(6), *(int*)(cu));
|
||||
|
||||
int *i = m.ptr<int>(idx);
|
||||
EXPECT_EQ(int(6), *(i));
|
||||
const int *ci = m.ptr<int>(idx);
|
||||
EXPECT_EQ(int(6), *(ci));
|
||||
}
|
||||
|
||||
}} // namespace
|
||||
|
||||
Reference in New Issue
Block a user