mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
Merge pull request #25945 from vrabaud:02_fix
Fix size() for 0d matrix #25945 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
@@ -2414,7 +2414,15 @@ TEST(Mat, regression_18473)
|
||||
EXPECT_EQ((int)5, (int)m.at<short>(19, 49, 99));
|
||||
}
|
||||
|
||||
// FITIT: remove DISABLE_ when 1D Mat is supported
|
||||
TEST(Mat0D, basic)
|
||||
{
|
||||
Mat1b m1, m2(0, nullptr);
|
||||
ASSERT_EQ(0, m1.size().width);
|
||||
ASSERT_EQ(0, m1.size().height);
|
||||
ASSERT_EQ(1, m2.size().width);
|
||||
ASSERT_EQ(1, m2.size().height);
|
||||
}
|
||||
|
||||
TEST(Mat1D, basic)
|
||||
{
|
||||
std::vector<int> sizes { 100 };
|
||||
|
||||
Reference in New Issue
Block a user