mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-20 12:55:15 +08:00

BlobShape::all(int, int) substitutes explicit BlobShape(int,int) added new intuitive constructors: BlobShape(s0); BlobShape(s0, s1)... added corresponding tests
32 lines
464 B
C++
32 lines
464 B
C++
#include "test_precomp.hpp"
|
|
|
|
CV_TEST_MAIN("")
|
|
|
|
namespace cvtest
|
|
{
|
|
|
|
using namespace cv;
|
|
using namespace cv::dnn;
|
|
|
|
TEST(BlobShape_SimpleConstr, Regression)
|
|
{
|
|
BlobShape sd;
|
|
|
|
BlobShape s1(0);
|
|
EXPECT_EQ(s1.dims(), 1);
|
|
EXPECT_EQ(s1[0], 0);
|
|
|
|
BlobShape s2(0, 0);
|
|
EXPECT_EQ(s2.dims(), 2);
|
|
EXPECT_EQ(s2[0], 0);
|
|
EXPECT_EQ(s2[1], 0);
|
|
}
|
|
|
|
TEST(BlobShape_EmptyFill, Regression)
|
|
{
|
|
BlobShape s(10, (int*)NULL);
|
|
EXPECT_EQ(s.dims(), 10);
|
|
}
|
|
|
|
}
|