gapi_int_proto_tests.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. // This file is part of OpenCV project.
  2. // It is subject to the license terms in the LICENSE file found in the top-level directory
  3. // of this distribution and at http://opencv.org/license.html.
  4. //
  5. // Copyright (C) 2020 Intel Corporation
  6. #include "../test_precomp.hpp"
  7. #include "../src/api/gproto_priv.hpp"
  8. namespace opencv_test {
  9. template<typename T>
  10. struct ProtoPtrTest : public ::testing::Test { using Type = T; };
  11. using ProtoPtrTestTypes = ::testing::Types< cv::Mat
  12. , cv::UMat
  13. , cv::RMat
  14. , cv::Scalar
  15. , std::vector<int>
  16. , int
  17. >;
  18. TYPED_TEST_CASE(ProtoPtrTest, ProtoPtrTestTypes);
  19. TYPED_TEST(ProtoPtrTest, NonZero)
  20. {
  21. typename TestFixture::Type value;
  22. const auto arg = cv::gout(value).front();
  23. const auto ptr = cv::gimpl::proto::ptr(arg);
  24. EXPECT_EQ(ptr, &value);
  25. }
  26. } // namespace opencv_test