BlobShape::all(int, int) substitutes explicit BlobShape(int,int) added new intuitive constructors: BlobShape(s0); BlobShape(s0, s1)... added corresponding testspull/707/head
parent
5baccb7bf1
commit
6d3cb8080c
8 changed files with 87 additions and 20 deletions
@ -1,3 +1,31 @@ |
|||||||
#include "test_precomp.hpp" |
#include "test_precomp.hpp" |
||||||
|
|
||||||
CV_TEST_MAIN("") |
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); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
Loading…
Reference in new issue