The following issues were found
modules/core/test/ocl/test_gemm.cpp
1 issues
Line: 130
}
};
OCL_TEST_P(Gemm, Accuracy)
{
for (int i = 0; i < test_loop_times; ++i)
{
generateTestData();
Reported by Cppcheck.
modules/core/test/ocl/test_image2d.cpp
1 issues
Line: 27
std::cout << "OpenCL runtime not found. Test skipped." << std::endl;
}
TEST(Image2D, createImage2DWithEmptyUMat)
{
if (cv::ocl::haveOpenCL())
{
UMat um;
EXPECT_ANY_THROW(cv::ocl::Image2D image(um));
Reported by Cppcheck.
modules/core/test/ocl/test_matrix_expr.cpp
1 issues
Line: 36
//////////////////////////////// UMat::eye /////////////////////////////////////////////////
OCL_TEST_P(UMatExpr, Eye)
{
for (int j = 0; j < test_loop_times; j++)
{
generateTestData();
Reported by Cppcheck.
modules/core/test/ocl/test_matrix_operation.cpp
1 issues
Line: 88
}
};
OCL_TEST_P(ConvertTo, WithScale_Accuracy)
{
for (int j = 0; j < test_loop_times; j++)
{
generateTestData();
Reported by Cppcheck.
modules/core/test/ocl/test_opencl.cpp
1 issues
Line: 29
EXPECT_EQ(0, cvtest::norm(reference, res, cv::NORM_INF));
}
TEST(OpenCL, support_binary_programs)
{
cv::ocl::Context ctx = cv::ocl::Context::getDefault();
if (!ctx.ptr())
{
throw cvtest::SkipTestException("OpenCL is not available");
Reported by Cppcheck.
modules/core/test/test_arithm.cpp
1 issues
Line: 2426
}
INSTANTIATE_TEST_CASE_P(/* */, Core_DivideRules, testing::Combine(
/* isMat */ testing::Values(false),
/* scale */ testing::Values(1.0, 5.0),
/* largeSize */ testing::Bool(),
/* tail */ testing::Bool(),
/* roi */ testing::Bool()
Reported by Cppcheck.
modules/core/test/test_async.cpp
1 issues
Line: 41
EXPECT_THROW(r.get(m3), cv::Exception);
}
TEST(Core_Async, ExceptionCheck)
{
Mat m(3, 3, CV_32FC1, Scalar::all(5.0f));
AsyncPromise p;
AsyncArray r = p.getArrayResult();
EXPECT_TRUE(r.valid());
Reported by Cppcheck.
modules/core/test/test_conjugate_gradient.cpp
1 issues
Line: 86
}
};
TEST(Core_ConjGradSolver, regression_basic){
cv::Ptr<cv::ConjGradSolver> solver=cv::ConjGradSolver::create();
#if 1
{
cv::Ptr<cv::MinProblemSolver::Function> ptr_F(new SphereF_CG());
cv::Mat x=(cv::Mat_<double>(4,1)<<50.0,10.0,1.0,-10.0),
Reported by Cppcheck.
modules/core/test/test_countnonzero.cpp
1 issues
Line: 282
typedef testing::TestWithParam<tuple<int, cv::Size> > CountNonZeroBig;
TEST_P(CountNonZeroBig, /**/)
{
const int type = get<0>(GetParam());
const Size sz = get<1>(GetParam());
EXPECT_EQ(0, cv::countNonZero(cv::Mat::zeros(sz, type)));
Reported by Cppcheck.
modules/core/test/test_downhill_simplex.cpp
1 issues
Line: 82
}
};
TEST(Core_DownhillSolver, regression_basic){
cv::Ptr<cv::DownhillSolver> solver=cv::DownhillSolver::create();
#if 1
{
cv::Ptr<cv::MinProblemSolver::Function> ptr_F = cv::makePtr<SphereF>();
cv::Mat x=(cv::Mat_<double>(1,2)<<1.0,1.0),
Reported by Cppcheck.