mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge pull request #26101 from mshabunin:cpp-error-ts
C-API cleanup: moved cvErrorStr to new interface, minor ts changes #26101 Merge with opencv/opencv_contrib#3786 **Note:** `toString` might be too generic name (even though it is in `cv::Error::` namespace), another variant is `codeToString` (we have `typeToString` and `depthToString` in check.hpp). **Note:** _ts_ module seem to have no other C API usage except for `ArrayTest` class which requires refactoring.
This commit is contained in:
@@ -44,8 +44,6 @@
|
||||
|
||||
namespace opencv_test { namespace {
|
||||
|
||||
#define CORE_COUNTNONZERO_ERROR_COUNT 1
|
||||
|
||||
#define MESSAGE_ERROR_COUNT "Count non zero elements returned by OpenCV function is incorrect."
|
||||
|
||||
#define sign(a) a > 0 ? 1 : a == 0 ? 0 : -1
|
||||
@@ -203,7 +201,7 @@ void CV_CountNonZeroTest::run(int)
|
||||
cout << "Number of experiment: " << i << endl;
|
||||
cout << "Method of data generation: RANDOM" << endl;
|
||||
print_information(right, result);
|
||||
CV_Error(CORE_COUNTNONZERO_ERROR_COUNT, MESSAGE_ERROR_COUNT);
|
||||
CV_Error(cv::Error::StsError, MESSAGE_ERROR_COUNT);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -219,7 +217,7 @@ void CV_CountNonZeroTest::run(int)
|
||||
cout << "Number of experiment: " << i << endl;
|
||||
cout << "Method of data generation: HALF-RANDOM" << endl;
|
||||
print_information(count_non_zero, result);
|
||||
CV_Error(CORE_COUNTNONZERO_ERROR_COUNT, MESSAGE_ERROR_COUNT);
|
||||
CV_Error(cv::Error::StsError, MESSAGE_ERROR_COUNT);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -235,7 +233,7 @@ void CV_CountNonZeroTest::run(int)
|
||||
cout << "Number of experiment: " << i << endl;
|
||||
cout << "Method of data generation: STATISTIC" << endl;
|
||||
print_information(right, result);
|
||||
CV_Error(CORE_COUNTNONZERO_ERROR_COUNT, MESSAGE_ERROR_COUNT);
|
||||
CV_Error(cv::Error::StsError, MESSAGE_ERROR_COUNT);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user