mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-19 19:44:14 +08:00

Migrate G-API module from main repo to opencv_contrib #3827 Related to https://github.com/opencv/opencv/pull/26469 Required https://github.com/opencv/opencv/pull/26527 CI: https://github.com/opencv/ci-gha-workflow/pull/201 TODO: - [x] Python types generator fix - [x] CI update ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [ ] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
35 lines
1.0 KiB
C++
35 lines
1.0 KiB
C++
// This file is part of OpenCV project.
|
|
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
|
// of this distribution and at http://opencv.org/license.html.
|
|
//
|
|
// Copyright (C) 2020 Intel Corporation
|
|
|
|
|
|
#include "../test_precomp.hpp"
|
|
#include "../src/api/gproto_priv.hpp"
|
|
|
|
namespace opencv_test {
|
|
|
|
template<typename T>
|
|
struct ProtoPtrTest : public ::testing::Test { using Type = T; };
|
|
|
|
using ProtoPtrTestTypes = ::testing::Types< cv::Mat
|
|
, cv::UMat
|
|
, cv::RMat
|
|
, cv::Scalar
|
|
, std::vector<int>
|
|
, int
|
|
>;
|
|
|
|
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);
|
|
}
|
|
|
|
} // namespace opencv_test
|