The following issues were found
modules/gapi/test/internal/gapi_int_gmetaarg_test.cpp
1 issues
Line: 26
"GMatDesc is a meta description type");
}
TEST(GMetaArg, Traits_Is_Negative)
{
using namespace cv::detail;
static_assert(!is_meta_descr<cv::GCompileArgs>::value,
"GCompileArgs is NOT a meta description type");
Reported by Cppcheck.
modules/gapi/test/internal/gapi_int_gmodel_builder_test.cpp
1 issues
Line: 73
}
}// namespace opencv_test::test
TEST(GModelBuilder, Unroll_TestUnary)
{
cv::GMat in;
cv::GMat out = test::unaryOp(in);
auto unrolled = cv::gimpl::unrollExpr(cv::GIn(in).m_args, cv::GOut(out).m_args);
Reported by Cppcheck.
modules/gapi/test/internal/gapi_int_island_tests.cpp
1 issues
Line: 43
using GIntArray = GArray<int>;
G_TYPED_KERNEL(CreateMatWithDiag, <GMat(GIntArray)>, "test.array.create_mat_with_diag")
{
static GMatDesc outMeta(const GArrayDesc&) { return cv::GMatDesc{CV_32S, 1,{3, 3}}; }
};
GAPI_OCV_KERNEL(CreateMatWithDiagImpl, CreateMatWithDiag)
Reported by Cppcheck.
modules/gapi/test/internal/gapi_int_pattern_matching_test.cpp
1 issues
Line: 62
}
} // matching_test
TEST(PatternMatching, TestFuncDoesNotChangeTestGraph)
{
// Pattern
ade::Graph pg;
{
GMat in;
Reported by Cppcheck.
modules/gapi/test/internal/gapi_int_perform_substitution_test.cpp
1 issues
Line: 51
// Custom kernels && transformations below:
G_TYPED_KERNEL(MyNV12toBGR, <GMat(GMat, GMat)>, "test.my_nv12_to_bgr") {
static GMatDesc outMeta(GMatDesc in_y, GMatDesc in_uv) {
return cv::gapi::imgproc::GNV12toBGR::outMeta(in_y, in_uv);
}
};
GAPI_OCV_KERNEL(MyNV12toBGRImpl, MyNV12toBGR)
Reported by Cppcheck.
modules/gapi/test/internal/gapi_int_proto_tests.cpp
1 issues
Line: 27
TYPED_TEST_CASE(ProtoPtrTest, ProtoPtrTestTypes);
TYPED_TEST(ProtoPtrTest, NonZero)
{
typename TestFixture::Type value;
const auto arg = cv::gout(value).front();
const auto ptr = cv::gimpl::proto::ptr(arg);
EXPECT_EQ(ptr, &value);
Reported by Cppcheck.
modules/gapi/test/internal/gapi_int_recompilation_test.cpp
1 issues
Line: 37
EXPECT_EQ(&comp1.priv(), &comp2.priv());
}
TEST(GComputationCompile, NoRecompileWithWrongMeta)
{
cv::GMat in;
cv::GComputation cc(in, in+in);
cv::Mat in_mat1 = cv::Mat::eye (32, 32, CV_8UC1);
Reported by Cppcheck.
modules/gapi/test/internal/gapi_int_vectorref_test.cpp
1 issues
Line: 19
TYPED_TEST_CASE(VectorRefT, VectorRef_Test_Types);
TYPED_TEST(VectorRefT, Reset_Valid)
{
using T = typename TestFixture::Type;
cv::detail::VectorRefT<T> ref; // vector ref created empty
EXPECT_NO_THROW(ref.reset()); // 1st reset is OK (initializes)
EXPECT_NO_THROW(ref.reset()); // 2nd reset is also OK (resets)
Reported by Cppcheck.
modules/gapi/test/internal/gapi_transactions_test.cpp
1 issues
Line: 82
} // anonymous namespace
TEST_F(Transactions, NodeCreated_Create)
{
auto new_nh = graph.createNode();
Change::NodeCreated node_created(new_nh);
EXPECT_EQ(6u, static_cast<std::size_t>(graph.nodes().size()));
Reported by Cppcheck.
modules/gapi/test/own/conc_queue_tests.cpp
1 issues
Line: 18
{
using namespace cv::gapi;
TEST(ConcQueue, PushPop)
{
own::concurrent_bounded_queue<int> q;
for (int i = 0; i < 100; i++)
{
q.push(i);
Reported by Cppcheck.