added some tests for push_back

This commit is contained in:
Ilya Lavrenov
2016-07-14 17:13:09 +03:00
parent 2d964f800d
commit 957bf1452c
2 changed files with 20 additions and 2 deletions

View File

@@ -839,9 +839,9 @@ void Mat::push_back(const Mat& elems)
bool eq = size == elems.size;
size.p[0] = r;
if( !eq )
CV_Error(CV_StsUnmatchedSizes, "");
CV_Error(CV_StsUnmatchedSizes, "Pushed vector length is not equal to matrix row length");
if( type() != elems.type() )
CV_Error(CV_StsUnmatchedFormats, "");
CV_Error(CV_StsUnmatchedFormats, "Pushed vector type is not the same as matrix type");
if( isSubmatrix() || dataend + step.p[0]*delta > datalimit )
reserve( std::max(r + delta, (r*3+1)/2) );